How do you make the status bar appear iOS - ios

This is getting very frustrating for me because I can't get the status bar to appear in my app. Everything related as far as UI is done on storyboard. when i set my status bar:inferred, top bar: inferred in my navigation controller, the status bar shows up fine. However, I do not want the top bar to appear as it interferes with my layout, so I set the top bar to none, which results in no top bar or status bar.
How can I just make the status visible without affecting my layout? (auto-layout is enabled)

So I did more googling and research, turns out I just had to add View controller-based status bar appearance as the key and the value as NO in the .plist file

Related

Design tab doesn't account for status bar spacing

When running the app, part of the content is hidden behind the phone's status bar.
I've tried to look this up, but I mostly see code on how to hide the phone's status bar, but I don't want to do that; I want to keep the phone's status bar visible.
Thanks
Showing Layout Decorations under the "Eye" option shows the status bar so I can do the layout accommodating it. solved

iOS 7 Displaying Status bar on Certain Views/Status Bar Cutting over View

I have an app where all of the views, except one, needs a status bar displayed on top. After spending time googling and searching here, I cannot find a solid answer that works.
Right now, with View controller-based status bar appearance set to YES, and
-(BOOL)prefersStatusBarHidden
{
return YES;
}
in my 'hidden status bar' ModalViewController, the upper half of my Navigation Item is cut off.
http://i.stack.imgur.com/m2xc2.png
Currently, the rest of the app's view's doesn't have a status bar. Suggestions?

ios move ui view down after hiding status bar

I've read a few questions here and searched around a bit but nothing seems to solve my problem. I have a side navigation controller of which I am sliding the status bar (using a technique outlined here: Moving status bar in iOS 7).
In any event, when I hide the status bar to begin the slide (as soon as I tell the view to hide the status bar and add a fake one), the entire view moves up behind my faux status bar. Is there any way to move the view down so that the faux status bar appears directly above the view?
may be some autolayout issueAs there is no status bar , the view frame went to frame.origin.y=0. Try setting the frame to origin.y=20 before you hide the status bar.
If you are adding fake status bar as subview to mainView. set frame of fake status bar view to (origin.y=-20)

iOS 7 - Status bar overlaps the view content

I am using status bar in my app and wanted to maintain the compatibility between ios 6 and ios 7. I wanted status bar to behave same as ios 6. I don't want status bar to overlap view controllers.
Try adding the following code in your view's viewWillAppear function:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// if this is ios7 this code will make the view appear properly below the navigation bar
if ([[UIDevice currentDevice].systemVersion floatValue] >= 7.0) {
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = YES;
}
}
Try this~
if(OVER_IOS7){
self.edgesForExtendedLayout = UIRectEdgeNone;
[self.navigationController.navigationBar setTranslucent:NO]
}
Try this.
add this key into info.plist file
View controller-based status bar appearance
set value for this to:- No
In iOS 7, the status bar is transparent, and other bars—that is, navigation bars, tab bars, toolbars, search bars, and scope bars—are translucent. As a general rule, you want to make sure that content fills the area behind the bars in your app.
Most bars also draw a blur behind them, unless you provide a custom background image for the bar.
iOS 7 introduces the barPosition property for identifying bar position, which helps you specify when a custom background image should extend behind the status bar. The UIBarPositionTopAttached value means that a bar is at the top of the screen and its background extends upward into the status bar area. In contrast, the UIBarPositionTop value means that a bar is at the top of its local context—for example, at the top of a popover—and that it doesn’t provide a background for the status bar.
By default, all bar buttons are borderless. For details, see Bar Buttons.
The Status Bar
Because the status bar is transparent, the view behind it shows through. The style of the status bar refers to the appearance of its content, which includes items such as time, battery charge, and Wi-Fi signal. Use a UIStatusBarStyle constant to specify whether the status bar content should be dark (UIStatusBarStyleDefault) or light (UIStatusBarStyleLightContent):
UIStatusBarStyleDefault displays dark content. Use when light content is behind the status bar. image: ../Art/status_bar_default_iphone_2x.pngimage: ../Art/status_bar_default_ipad_2x.png
UIStatusBarStyleLightContent displays light content. Use when dark content is behind the status bar. image: ../Art/status_bar_light_iphone_2x.pngimage: ../Art/status_bar_light_ipad_2x.png
In some cases, the background image for a navigation bar or a search bar can extend up behind the status bar (for details, see Navigation Bar and Search Bar and Scope Bar). If there are no bars below the status bar, the content view should use the full height of the screen. To learn how to ensure that a view controller lays out its views properly, see Using View Controllers.
In iOS 7, you can control the style of the status bar from an individual view controller and change it while the app runs. If you prefer to opt out of this behavior and set the status bar style by using the UIApplication statusBarStyle method, add the UIViewControllerBasedStatusBarAppearance key to an app’s Info.plist file and give it the value NO.

navigation bar gets under the status bar in 4" screens

I embedded a navigation controller in a tab bar controller, the problem is that the navigation bar (with the blue color) get under the status bar. So the status bar appear transparent because it shows what is under. Here is a screenshot:
I tried to modify the status bar directly in Attributes Inspector to black and Translucent black, also disabled autolayout although i know it has nothing to do with such issue. Anyway, nothing is fixed. I used to work with that in iOS5, but since iOS6 and the new 4" storyboard screen, i got this issue.
There is a misunderstanding here. The navigation bar is not "under" the status bar. This is iOS 6's new color-adopting status bar. You can read more here.
If you do not like this behavior, your only option is to make the status bar black. Take a look at the project properties page.

Resources