DevonCarlson
DevonCarlson

Reputation: 147

How can I make my status bar be the same colour as my navigation bar?

I want my navigation bar to look similar to that of the Twitter app. My app only has three different views, so I don't mind doing each one manually. How do I go about doing this?

Upvotes: 0

Views: 97

Answers (1)

Daniel Storm
Daniel Storm

Reputation: 18898

Create a view, put it where the status bar will be, and set its background color to which ever color you prefer.

let statusBarView = UIView(frame: UIApplication.sharedApplication().statusBarFrame)
statusBarView.backgroundColor = UIColor.greenColor() // Replace with color you desire
self.view.addSubview(statusBarView)

Upvotes: 1

Related Questions