Hide status bar

I hope to display a view of one of the ViewControllers in my application as full screen, so in Interface Builder I set the status bar to None. I also resize the frame as 320 * 480

but when I started the application, the status bar is still displayed in the viewcontroller view.

Welcome any comment

thank

alt text

+3
source share
3 answers

Call setStatusBarHidden: withAnimation: in [UIApplication sharedApplication].

+5
source

the problem is not solved. In the project plist settings file, check the key "The status bar is initially hidden", the status bar will be deleted from the launch.

+1
source

wantsFullScreenLayout YES. xib viewDidLoad.

wantsFullScreenLayout

, , .

@property (, ) BOOL FullScreenLayout

, . YES , , . (, , , , .) YES , , .

If this property is YES, the view does not change in such a way as to make it smooth the tab bar, but to resize it for the translucent translucent Toolbar. Regardless of the value of this property, navigation controllers always allow views to hide transparent navigation bars.

The default value of this property is NO, which causes the view to appear, so it does not overlap the status bar.

Availability Available in iOS 3.0 and later.

Announced in

UIViewController.h

+1
source

Source: https://habr.com/ru/post/1771038/


All Articles