iOS8中如何将状态栏的字体颜色改为白色
网上的一些方法在我这行不通,
比如:
UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent
、Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file. 、In the viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate]; 、Add the following method: -(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
最后终于有个方法OK
1、设置Info.plist中的View controller-based status bar appearance为YES
2、然后在AppDelegate.swift中的
func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool
方法中加入:
UINavigationBar.appearance().barStyle = UIBarStyle.Black
OK,就是这么简单。这样状态栏的字体就变成白色了!
最新文章
- Java中成员变量和局部变量的区别
- devexpress 控制面板汉化方式 参考信息
- ubuntu1404_server搭建lamp
- 用perl对字符串进行全角转半角操作
- Android SDK Manager无法更新问题解决
- 算法----希尔排序(shell sort)
- segment
- 序列化(ObjectOutputStream和ObjectInputStream)(切记:out是输出到本地中,in是输入到程序中)
- Python基础1-变量、运算符、表达式
- 【JS学习笔记】提取行间事件
- centos dmesg
- Linux-vim学习入门
- Vue源码后记-其余内置指令(1)
- Eclipse的Outline功能栏调出来
- @RequestBody注解的参数仅仅读取一次的问题解决。
- linux就该这么学,第六天了
- WebStrom设置默认浏览器
- win10定时执行php脚本
- 百练1678-整数的个数-2015正式A题
- 【洛谷】【单调栈】P1901 发射站