Change UINavigationBar Height

前端 未结 12 1525
囚心锁ツ
囚心锁ツ 2020-11-28 09:26

Can some one tell me how to change the navigation bar height?

Here is what i have so far:

CGFloat navBarHeight = 10;
self.navigationController.navi         


        
12条回答
  •  旧巷少年郎
    2020-11-28 10:03

    I ran into a lot of problems depending on the method chosen. In my specific case, the navigation bar was hidden throughout the app except in the Settings View Controller. As I needed to specify a custom height of the navigation bar and show the navigation bar at the same time, the segue between the source view controller and the Settings View Controller had a very sloppy animation.

    The absolute best solution can be found here: https://gist.github.com/maciekish/c2c903d9b7e7b583b4b2. I just imported the category into the Settings View Controller, and in viewDidLoad called the setHeight: method on `self.navigationController.navigationBar'. Looks great!

提交回复
热议问题