UINavigationBar autoresizing

前端 未结 8 2044
忘了有多久
忘了有多久 2020-12-08 11:39

In my app, I got a UINavigationController. Unfortunately, when I rotate the device and the interface orientation changes, the UINavigationBar doesn\'t change its height. In

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 12:37

    I think the behavior you want only happens when a navigation controller ( which represents the bars (navigation or toolbar)), is added to the window in the app delegate or presented by a tab bar, etc.

    You can add a navigation bar via IB or code, it doesn't mean you have a navigation controller. My opinion is, create a navigation controller and initialize it with the view controller you're working in. Probably when the view rotates, the nav bar will shrink a little, the way you like.

    Hope this helps

提交回复
热议问题