for a simple view controller in a tab bar controller I got this order for iOS 8.3
13:57:46.610 loadView
13:57:46.612 viewDidLoad
13:57:46.612 updateViewConstraints
13:57:46.613 viewWillLayoutSubviews
13:57:46.613 viewDidLayoutSubviews
13:57:46.614 viewWillAppear:
13:57:46.616 prefersStatusBarHidden
13:57:46.616 viewWillLayoutSubviews
13:57:46.616 viewDidLayoutSubviews
13:57:46.712 viewDidAppear:
The reason you see the viewWillLayoutSubviews
/viewDidLayoutSubviews
calls twice, that any transitioning animation is happening in between.
I would expect that if there is a animation, also the disappearing of a statusbar would be animated and that might be the reason the call for prefersStatusBarHidden
happens there.
So whatever you want to do in viewDidLoad
is better suited in viewWillLayoutSubviews
or viewDidLayoutSubviews
I used this code: https://github.com/vikingosegundo/ofaexample/blob/298c56346f49c467c9f54e9cf18cd5ec604c1fdc/OFAExample/SecondViewController.m