Try this
Add below code in didRotateFromInterfaceOrientation
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
EDIT
NO NEED TO WRITE CODE IN ALL VIEW CONTROLLER
Set View controller-based status bar appearance
to NO
in plist
and add below code in
root view controller's viewDidLoad
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
Demo project
https://www.dropbox.com/s/uumneidk4wom5md/demoStatusBar.zip?dl=0
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…