Storyboard-set iOS 7 Status Bar not shown in right style - ios

I have two Scenes in a Storyboard; a dark one and a light one.
Set to Default in the Simulated metrics' Status Bar section, the light scene's bar is dark and works correctly. The dark scene's is set the same way to Light Content style but it doesn't change.
No mention of the bar anywhere in the code itself, what's wrong?

The simulated metrics is only for XCode. You need to set this for the view in the views viewcontroller.
UIViewController:preferredStatusBarStyle
StackoverFlow question covering the same

Related

Customize UISearchController in TVOS

i'm working with UISearchController in TVOS application. I'm facing few issues in that.
Basically, this controller is embedded in tabBarController, and i want:
1- Search bar to be placed below the tab bar. Is it possible? I don't want to make my tabBar translucant but to change the frame of search Bar. Is it possible
2- As shown in image, i want the color of alphabets and other keys to be pink (when in focused mode). The default color is black (for focus mode) & grey (for normal mode). How to update that?
Thanks

Move navigation bar in navigation view controller in ios7

I want add 20 points margin to my navigation bar. I need it because I want another background color under status bar as youtube did:
I found
iOS Developer library says: Status bar background appearance provided by the window background, if using UIBarPositionTop.
I found solution for toolbar, but I can't move my navigation bar inside navigation view controller. I just set UIBarPositionTop for my navigation bar, but it changes nothing.
-(UIBarPosition)positionForBar:(id<UIBarPositioning>)bar {
NSLog(#"position method called");
return UIBarPositionTop;
}
I still see the gray background of status bar instead of white.
Is it possible to do it with a navigation bar or should I use a view with a toolbar?
(XCode 6, development target 7.0+, sdk 8.0, autolayout)
UPDATE: ANOTHER WAY TO RESOLVE PROBLEM
I read this question
and understood, that there is no need to add margin. I added view with background color I need over my navigation bar controller and it resolved my problem.
When you are adding your UIView to the UIWindow, you should change the UIViews size to not underlap the title bar. How to do this is well documented in this post:
Offset on UIWindow addSubview
I hope i understood correctly, look in size inspector, ios 6/7 deltas.
Check this link for an explanation:
Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?

Why can't I set the navigation controller background color in the storyboard?

I don't understand why the background color setting in the storyboard doesn't work for my navigation controller? (See picture)
http://ctrlv.in/299323
I have here set it to bright red but as you can see it does nothing in the storyboard or to the app when I build it.
Any thoughts?
I know I can set the color programmatically, and this is what I am currently doing. However, it would be nice to see the changes in the storyboard so I don't have to build the app every time I make a color change to see the difference.
Yes you can. Notice that you're changing UIView properties not Navigation bar. Look at the screen below:
You have to set Bar Tint property.

Search bar partially disappears when switching views in iOS 7

We have a UISearchBar backed by a UISearchDisplayController in our app. Changing screens with the search bar hidden partway under the header causes that portion of the bar to be gone when the user returns, revealing the search bar's background. Here, I have it set to red which shows me that the search frame size and position are still correct.
Tapping anywhere inside the bar brings up the keyboard as expected. However, once the bar moves to the top of the screen, the part that was hidden stops responding to input. This blocks text selection and taps to the top of the Cancel button.
I have experimented with all of the answers in this question without success, so I think our issue is different, though likely related. Does anyone know what's going on, and how we can fix it? Thanks for your input.
If you are running on iOS 7.0 version then you need to set following property which is newly introduced in iOS 7.0 as follows
self.edgesForExtendedLayout = UIRectEdgeNone;
as by default edgesForExtendedLayout property is set to UIRectEdgeAll that means the view controllers use full-screen layout by default. And your's searchbar appeared to be rendered behind the navigation bar, starting from navigation bar offset.

Change statusbar tint colour

Is there a way to set the status bar tint colour?
I have my navigationbar tint set to brown and when it's on screen it also changes the statusbar to brown, however on views that I hide the navigationbar the statusbar returns to its original colour.
How can I change the statusbar tint colour to persist trough the application?
There is no way in iOS 5. You can just change your bar style.
But if you take a look at new WWDC 2012 Sessions, you may find something interesting)
Session number 216 - Advanced Appearance Customization on iOS
Maybe keep the notification bar there but cover it up? If the notification bar's color influences that of the status bar, then it would lead me to believe that it just has to be in the window (even buried under another view) to change it.
There is no way in iOS 5 or ealier version of ios.
now ios 6 have feature to change status bar tint color or it will set according to navigation bar pattern Image
But u can use Custom Status Bar
What I do in screens that have no navigation bar is to put in a navigation bar at the top but behind the visible interface. The navigation bar is not visible to the user, but it is visible to the system and causes the status bar to adopt its color.
EDIT: Sorry, I see now that someone else had already suggested this. So I'm just confirming that it does work.

Resources