我有一个简短的问题要问你。是否可以在 iOS 7 中更改状态栏的颜色(如 Facebook 应用程序)并且是否也可以增加状态栏的透明度?
提前谢谢你,戴维
我有一个简短的问题要问你。是否可以在 iOS 7 中更改状态栏的颜色(如 Facebook 应用程序)并且是否也可以增加状态栏的透明度?
提前谢谢你,戴维
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)?YES:NO) {
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"newImage.png"] forBarMetrics:UIBarMetricsDefault];
}else{
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"previousImage.png"] forBarMetrics:UIBarMetricsDefault];
}
或者你也可以这样做:
[UINavigationBar appearance].barTintColor = [UIColor redColor];
如果您没有在应用程序中显示导航栏。
You can change navigation bar color to change status bar color.
[UINavigationBar appearance].barTintColor = [UIColor greenColor];