The operation between viewWillAppear and viewDidAppear?

I change the navigationBar's height in the methodviewWillAppearIn 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 inviewWillAppearandviewDidAppear, it works and isn't changed

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

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

What Others Are Reading