Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gray bar caused by NavigationController at bottom of screen

In my iPad app, I'm using a UITabBarController, with some of the tabs being a UISplitViewController. I've noticed when I embed my split views into a Nav controller I end up with a gray bar that spans the bottom of my screen that I cannot get rid of it.

For example, this:

Storyboard with one embedded Nav controller

Produces this:

Gray bar example

Now, if I go in and embed the detail side into a nav controller, here's the result:

2nd Example

I've tried everything I can think of and that gray bar at the bottom just won't go away. Anyone have any tips?

like image 676
bugfixr Avatar asked Jul 17 '14 16:07

bugfixr


People also ask

What is the GREY bar at the bottom of my iPad?

All replies The Home Bar that you see on your 2018 or 2020 iPad Pro is a feature of the User Interface; it is not configurable and cannot be disabled. If you have an App usability issue, you should direct any queries to the App Developer - as only they can make necessary changes to their Apps.


2 Answers

Subclass UISplitViewController and add:

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.extendedLayoutIncludesOpaqueBars = YES;
}

or

- (BOOL)extendedLayoutIncludesOpaqueBars
{
    return YES;
}
like image 196
Rafa de King Avatar answered Sep 22 '22 10:09

Rafa de King


Set the extendedLayoutIncludesOpaqueBars property of the UISplitViewController to true. This can be done when you initialize the controller (most likely in AppDelegate). I didn't need to subclass UISplitViewController to get it to work. Tested with iOS 9.2 and 9.3.

let splitViewController = UISplitViewController()    
splitViewController.extendedLayoutIncludesOpaqueBars = true
like image 21
waroo Avatar answered Sep 19 '22 10:09

waroo