SWT*_*SWT 5 objective-c ipad ios ios7
iOS 6看起来......

同样的方式我想在iOS 7中显示状态栏
看到这个

但我的实际输出(重叠)
我试过跟随逻辑
open your info.plist and set "View controller-based status bar appearance" = NO
Run Code Online (Sandbox Code Playgroud)
它在我的代码中不起作用,,,
Sta*_*lav 17
你必须做两件事.首先是打开你的info.plist设置"View controller-based status bar appearance" = NO
第二个是添加这些行 application:didFinishLaunchingWithOptions
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
{
self.window.clipsToBounds = YES;
[[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque];
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if(orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
{
self.window.frame = CGRectMake(20, 0,self.window.frame.size.width-20,self.window.frame.size.height);
self.window.bounds = CGRectMake(20, 0, self.window.frame.size.width, self.window.frame.size.height);
} else
{
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
self.window.bounds = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height);
}
}
Run Code Online (Sandbox Code Playgroud)
小智 9
阅读这篇文章:http://www.appcoda.com/customize-navigation-status-bar-ios-7/
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
[[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(0x067AB5)];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
52804 次 |
| 最近记录: |