Navigation Bar Hide Status Bar

As in the title, I have a navigation bar that hides my status bar. I run my application on a simulator and recently started to run it on an iPhone 4s iOS7 device, and noticed that the status bar is hidden or hidden, only you can see this is the green battery life. The reason I think it is hidden is because I have a search bar in one of my view controllers, and when I use the search bar, you can see the status bar, cell provider, time, etc.

Things I did to make sure I didn’t do this by accident:

Checked the Target-> Deployment Info ->Status Bar Style. It is in Default.

Checked each xib file to see if the status bar is set to none. All of them are at Default.

Searched the keyword "hidden" in all my .m files.

Anyone have any suggestions? I looked through here and see only messages about people who really want to hide it without fixing it. If someone had something like this, I can try something.

Answer:

I was using a navigation bar image and the sizes were different. 
I was using iOS6 bar size, 32x32, but now I am using 88x64 and 
that fixed it for iOS7. How do I check if phone is iOS6 or iOS7?
+4
source share
2 answers

The status bar is not hidden. On iOS 7, the status bar is always visible and overlaps your application as it was on iOS 6 and earlier. This is a new "normal" behavior. The status bar no longer has a background color. This is either black text on a transparent background ( UIStatusBarStyleDefault) or light text on a transparent background ( UIStatusBarStyleLightContent).

Light Content, .

: , UIKit UIViewController. . plist " ViewController", , . YES, ( UIKit) preferredStatusBarStyle, , . plist NO, , UIApplication.

+2

, knida , Status:

,

   self.view.backgroundcolor=[UIcolor WhiteColor];

subview , self.view, , :

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
    if(self.customView.frame.origin.y == 0) {
        CGRect viewBounds = [self.customView bounds];
        viewBounds.origin.y = 20;
        viewBounds.size.height = viewBounds.size.height - 20;
        self.customView.frame = viewBounds;
    }

}
0

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


All Articles