如何更改iPhone应用程序中标题部分(状态栏)的颜色.带有载体,时间和电池的部分.
这部分
更具体地说,这部分.我想将UI从黑色,白色或更容易看到的颜色更改.
要更改导航栏颜色:
navigationController!.navigationBar.barTintColor = UIColor.blueColor()
Run Code Online (Sandbox Code Playgroud)
要更改导航栏中的文本:
navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.yellowColor()]
Run Code Online (Sandbox Code Playgroud)
更新
要更改状态栏:
View controller-based status bar appearance并将值设置为NO白条:
UIApplication.sharedApplication().statusBarStyle = .LightContent
暗条:
UIApplication.sharedApplication().statusBarStyle = .Default
| 归档时间: |
|
| 查看次数: |
10489 次 |
| 最近记录: |