0

I change the navigationBar's height in the method viewWillAppear In first time, it works and the bar‘s height isn't changed. But when I push again, the bar's height change to 44

if I change the bar's height in viewWillAppear and viewDidAppear, it works and isn't changed

So, Is not a system between these two methods to do what action?

CinCout
  • 9,486
  • 12
  • 49
  • 67
陈开杰
  • 39
  • 7
  • 2
    have a look at [`viewWillLayoutSubviews`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/#//apple_ref/occ/instm/UIViewController/viewWillLayoutSubviews) – rckoenes Jun 15 '16 at 11:05
  • refer this link: http://stackoverflow.com/questions/5630649/what-is-the-difference-between-viewwillappear-and-viewdidappear – Bhadresh Kathiriya Jun 15 '16 at 11:08

1 Answers1

0

If you want change navigationbar's height you must hide navigationController.navigationBar and add new UINavigationBar to your controller. And add new UIBarButton (with title "Back") to newNavigationBar.leftBarBarItem.

Also you can add any UIView instead newNavigationBar