iOS7 Status Bar issue

匿名 (未验证) 提交于 2019-12-03 09:06:55

问题:

I have found many links for Status Bar issue in iOS 7 bt none of them helped much.

The issue is my application runs well in iOS6 but when I try to run it on iOS7, I want the iOS7 look and feel.

The status bar gels nicely with a UIViewController like below :

But for UINavigationController it goes black like below :

I managed to change the text-color of the statusBar using the following code in AppDelegate :

if ([[UIView appearance] respondsToSelector:@selector(setTintColor:)]) {         [[UIView appearance] setTintColor:[UIColor whiteColor]];     } 

Also, my plist file has the following entry : View controller-based status bar appearance set to NO

and my AppDelegate has :

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; 

I want the statusBar to take the Blue color when a NavigationController is loaded.

NOTE : I have used the following code for iOS7 support :

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000         self.edgesForExtendedLayout=UIRectEdgeNone; #endif 

Don't know if this caused the issue.

回答1:

It's hard to find the solution to your problem, but try using this guide, is really good:

http://www.appcoda.com/customize-navigation-status-bar-ios-7/



回答2:

It works fine if you use different images. One for iOS7 (20px higher) and one for the others and set this image as background for your navBar.

Hope this help :)



回答3:

There's a good and explained answer here.

Status bar and navigation bar issue in IOS7

and here

iOS 7 - Status bar overlaps the view



文章来源: iOS7 Status Bar issue
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!