itenyh
itenyh

Reputation: 1939

The NavigationBar is not totally hidden

I want to hide the NavigationBar and the stateBar to show fullScreen Image, but it seems that the navigationBar is not totally hidden:

enter image description here

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

Answers (2)

PaperThick
PaperThick

Reputation: 2799

Have you tried:

[[self navigationController] setNavigationBarHidden:YES animated:YES];

or:

self.wantsFullScreenLayout = YES;

?

Upvotes: 0

Engnyl
Engnyl

Reputation: 1380

Add the following to your Info.plist;

Status bar is initially hidden YES

Upvotes: 1

Related Questions