Forum Xamarin.iOS

hide Empty cell

hello,
How to remove the empty cell divider in xamarin ios.

Best Answer

  • guru_vijayguru_vijay ✭✭
    Accepted Answer

    UITableViewHeaderFooterView footer = new UITableViewHeaderFooterView();
    TableView.TableFooterView = footer;

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    Custom renderer for ListView would help .

    [assembly: ExportRenderer(typeof(ListView), typeof(MyRenderer))]
    namespace App2.iOS
    {
        class MyRenderer : ListViewRenderer
        {
            protected override void OnElementChanged(ElementChangedEventArgs<ListView> e)
            {
                base.OnElementChanged(e);
                if(Control != null)
                {
                    Control.TableFooterView = new UIView(frame:CGRect.Empty);
                }
            }
        }
    }
    

  • ColeXColeX Member, Xamarin Team Xamurai

    @guru_vijay Does my answer help or not ?

  • guru_vijayguru_vijay Member ✭✭
    Accepted Answer

    UITableViewHeaderFooterView footer = new UITableViewHeaderFooterView();
    TableView.TableFooterView = footer;

Sign In or Register to comment.