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 nic
Here is a Swift solution:
First, change UITableViewController
to UIViewController
and add a tableView
field.
Then, implement your viewDidLoad
method as follows:
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
tableView.frame = view.frame
view.addSubview(tableView)
let topBar = UIView(frame: UIApplication.sharedApplication().statusBarFrame)
topBar.backgroundColor = myDesiredColor
view.addSubview(topBar)
}