Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set fullscreen mode in iOS programmatically

Tags:

ios

How to set an iOS app for iPad to fullscreen programmatically?

like image 650
seabiscuit Avatar asked May 31 '11 02:05

seabiscuit


People also ask

How do I make IOS view full screen?

To view programmes in full screen, simply use the 'pinch and zoom' screen gesture. This will allow you to adjust the view between an aspect fit and an aspect fill.

Does iPhone have full screen mode?

iPhone, iPad, and Mac offer full-screen modes that can enable a distraction-free environment, often hiding system and app controls until people take action to reveal them.

How do I make ViewController full screen?

Present ViewController in full screen To prevent this, the presentation style can be changed. To present the DetailViewController full screen, the modalPresentationStyle property of a view controller must be set to . fullScreen before it will be presented.


2 Answers

Are you talking about the status bar which is visible? In the info.plist for your app, you can add a new entry, UIStatusBarHidden and make sure its checked. This would ensure that the status bar is hidden. You also have to make sure that your views are able to handle the additional screen real estate also.

like image 93
Karan Rath Avatar answered Oct 12 '22 06:10

Karan Rath


Nowadays (since IOS7) in order to do this you need to override a small tiny lily method of each UIViewController you want to do this

Swift

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

Objective C

-(BOOL)prefersStatusBarHidden{
    return YES;
}

Apple Doc: enter image description here

like image 6
bicycle Avatar answered Oct 12 '22 04:10

bicycle