UINavigationController without navigation bar?

后端 未结 6 1685
小蘑菇
小蘑菇 2020-12-07 15:01

I have a universal app, and on the iPad version I\'m using UISplitViewController to create an interface similar to the Mail app.

I was having trouble pu

6条回答
  •  一向
    一向 (楼主)
    2020-12-07 16:02

    If you want no navigation bar, and you want the content to be adjusted up to where the navigation bar normally would be, you should use

    self.navigationController.navigationBarHidden = YES;
    

    This gives you a result like this:

    enter image description here

    Whereas self.navigationController.navigationBar.hidden = YES; gives you a space where the navigationBar should be. Like this:

    enter image description here

提交回复
热议问题