Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Bottom Bar Navigation Controller

I want to hide the bottom toolbar on a certain screen in my application, and IB seems to have an option for that which seems to preview as working correctly, but when I build and test the application the bottom toolbar is still there.

I know that I can use [self.navigationController setToolbarHidden:YES]; but my question is not how to do it using code, but how to get this to work through Interface Builder.

enter image description here

Here is a screenshot of what I am talking about. See on the right how I have selected Bottom Bar: None - this removes the bottom bar as previewed to the left. If I set it to inferred (instead of None) the bottom bar shows in the IB preview.

How do I get this to work correctly?

like image 945
Baub Avatar asked Nov 07 '11 17:11

Baub


People also ask

How do I hide the bottom navigation bar?

Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.

How do I hide navigation bar in Swift storyboard?

Click on the controller that has the top bar navigate to the properties bar on the right hand side of Xcode. There is a drop down labeled Top Bar (as shown above) change this drop down to none.

How do I hide the bottom navigation bar in fragment Kotlin?

getHeight()). setDuration(1000); Use this code : when Scrolling down the Recyclerview to your fragment will hide the bottom navigation.


2 Answers

You can't set this in Interface Builder. If you notice the header of the section in IB where you can turn on/off these different bars, it says "simulated". These options are only there to help you visualize your UI in IB while designing it. They have absolutely no influence on the running app.

like image 52
Ole Begemann Avatar answered Oct 05 '22 03:10

Ole Begemann


I couldn't do it in storyboard when you just want to hide toolbar in one view controller. If you want to hide it for all, you need to go to the navigation controller, and set the values in the storyboard. But this makes all of your view controllers to hide the toolbars. If you want to hide it for one view controller use this in that view controller:

-(void) viewWillAppear:(BOOL)animated
{
    [self.navigationController.toolbar setHidden: YES];
}

-(void) viewWillDisappear:(BOOL)animated
{
    [self.navigationController.toolbar setHidden: NO];
}
like image 31
coolcool1994 Avatar answered Oct 05 '22 03:10

coolcool1994