Reputation: 768
How do i setup this view controller so that the Status bar that is currently white is blue like the navigation bar i dragged in?
Upvotes: 1
Views: 417
Reputation: 8396
Here is one way to change the color of status bar:
1- Create a png photo with 64 height and 320 width,the first 20 height of the image will be your status bar color, and the bottom 44 pixels will be he navigation bar color, like:
2- Uncheck the navigation bar translucent property from storyboard,so if tableview rows coming under the navigation bar while scrolling will not show, its like a solid image :
3- Add the photo you just created to assets , and place the code to change bar color in viewDidLoad
:
self.navigationController!.navigationBar.setBackgroundImage(UIImage(named: "yourphotoname"), forBarMetrics : .Default)
Upvotes: 1