Problem with hidden status bar in iphone application, screenshot is included

I get this blue line when I try to hide the status bar, I use the following line in the touchhesBegan method in my RootViewController

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];

http://i.stack.imgur.com/GBCgX.png

+3
source share
4 answers

Thiis is really simple. forget about its coding. just do it right at the beginning, it will make it much simpler and less messy. I do this all the time for every single application that I created.

Go to your project in xcode, then in the "Groups and Files" section, find the file named yourapplicationname-info.plist.

. . , . . . , "Enter", . . CDM + S, plist. xcode. , .

, .xib , ( , ). cmd + 3, . , , . uiview. , optiion 20 . . , , , . , . hit cmd + 3, . H () 300 320. , 20 , , . , .

, , .

+2

:

[CODE] self.navigationController.navigationBar.frame = CGRectOffset (self.navigationController.navigationBar.frame, 0.0, -20.0); [/CODE]

, , . , !!!!!

+1

, , , . , , Builder, setStatusBar: withAnimation:.

0
source

k, then you need to do in the class appdelegate

    [application setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

it works great for me ... hope this helps you>

0
source

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


All Articles