Hide bottom panel navigation controller

I want to hide the bottom toolbar on a specific screen in my application, and IB seems to have the option for the preview to appear to work correctly, but when I create 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 this with code, but how to make it work through Interface Builder.

enter image description here

Here is a screenshot of what I'm talking about. Look on the right as I selected the bottom panel: None - this removes the bottom panel, as shown on the left. If I set it to output (instead of None), the bottom line will appear in IB preview.

How can I make this work correctly?

+7
source share
3 answers

You cannot install this in Interface Builder. If you notice the section heading in IB, where you can turn on / off these different columns, it says "simulated." These parameters are available only for visualization of your interface in IB during its development. They have no effect on the running application.

+5
source

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

 -(void) viewWillAppear:(BOOL)animated { [self.navigationController.toolbar setHidden: YES]; } -(void) viewWillDisappear:(BOOL)animated { [self.navigationController.toolbar setHidden: NO]; } 
+4
source

Enable "Hides the bottom panel when clicked" inside IB if your ViewController is pushed onto the UINavigationController stack.

This should definitely do what you ask for. As a bonus, hiding and showing will be nicely animated by the system.

+3
source

All Articles