1
votes

As visible in the below screen shot,the white thin line in the status bar portion is due to the divider line of masterdetailpageI have masterdetailpage(UISplitViewController in iOS) in Xamarin forms with master behaviour as popover. How can I make that portion of divider line black even with custom renderer.

any solution in xamarin iOS is also welcome.

I tried many ways by setting the background color of view etc., but no luck.

Any help is welcome.

Thanks in Advance, Harikrishna.

1

1 Answers

0
votes

This anwser is in Xamarin.iOS

UISplitViewController doesnt have a property to change that divider but you can try to add a view to cover it up like so in teh ViewDidLoad in the MasteViewController:

        var coverView = new UIView(new CGRect(320, 0, 1, 64));
        coverView.BackgroundColor = UIColor.Black;
        SplitViewController.View.AddSubview(coverView);

for example ViewDidLoad in the master/detail template project:

public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();

            // Perform any additional setup after loading the view, typically from a nib.
            NavigationItem.LeftBarButtonItem = EditButtonItem;

            var addButton = new UIBarButtonItem (UIBarButtonSystemItem.Add, AddNewItem);
            addButton.AccessibilityLabel = "addButton";
            NavigationItem.RightBarButtonItem = addButton;

            DetailViewController = (DetailViewController)((UINavigationController)SplitViewController.ViewControllers [1]).TopViewController;

            TableView.Source = dataSource = new DataSource (this);

         // CODE not from template below
            var coverView = new UIView(new CGRect(320, 0, 1, 64));
            coverView.BackgroundColor = UIColor.Black;
            SplitViewController.View.AddSubview(coverView);
        }

The result is like this: enter image description here