Reputation: 1939
I want to hide the NavigationBar and the stateBar to show fullScreen Image, but it seems that the navigationBar is not totally hidden:
The code is as below:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
The height of the part which is not hidden is the same as the stateBar. How to fix this problem? thanks!
Upvotes: 0
Views: 96
Reputation: 2799
Have you tried:
[[self navigationController] setNavigationBarHidden:YES animated:YES];
or:
self.wantsFullScreenLayout = YES;
?
Upvotes: 0
Reputation: 1380
Add the following to your Info.plist;
Status bar is initially hidden YES
Upvotes: 1