Fullscreen on iOS programmatically

How to configure iOS app for iPad in full screen mode programmatically?

+4
source share
5 answers

Are you talking about the status bar that is visible? In info.plist for your application, you can add a new UIStatusBarHidden entry and be sure to check it. This will ensure that the status bar is hidden. You must also make sure that your views can also handle additional screen real estate.

+7
source

Currently (starting from iOS7), to do this, you need to override the little tiny lily method of each UIViewController that you want to do

Swift

override func prefersStatusBarHidden() -> Bool { return true; } 

Goal c

 -(BOOL)prefersStatusBarHidden{ return YES; } 

Apple Doc: enter image description here

+5
source

Maybe you need this one:

 [self setWantsFullScreenLayout:YES]; 

just add it to your viewController init method.
This may be needed by someone else.;)

+4
source
 [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; 

(other animation modes ... Fade and ... Slide.)

+4
source

You need to override var func,

 override var prefersStatusBarHidden: Bool { return true } 
0
source

All Articles