[英]How can I make my status bar be the same colour as my navigation bar?
我希望我的导航栏看起来类似于Twitter应用程序。 我的应用程序只有三个不同的视图,因此我不介意手动执行每个视图。 我该怎么做呢?
创建一个视图,将其放在状态栏所在的位置,然后将其背景色设置为您喜欢的任何一种颜色。
let statusBarView = UIView(frame: UIApplication.sharedApplication().statusBarFrame)
statusBarView.backgroundColor = UIColor.greenColor() // Replace with color you desire
self.view.addSubview(statusBarView)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.