I am building iOS8 app. On my tableview controller, I am using self.navigationController.hidesBarsOnSwipe = YES, to hide the navigationBar on swipe up gesture. It is working nicely, but my statusBar becomes transparent and shows the table content underneath.
On storyboard, Status Bar are Top Bar are set to "Inferred"
I want to: 1. Keep my status bar opaque 2. Maintain the same color as the navigationBar 3. Table content scrolls underneath the statusBar
Thank you.
Make a custom View.
You can add a constraint to the top layout, by this scrolling content will not appear below the status bar.
Here is a Swift solution:
First, change
UITableViewController
toUIViewController
and add atableView
field. Then, implement yourviewDidLoad
method as follows: