Xcode 11.1, iOS 13.1
I'm having difficulty figuring out why the TableView cells end up behind the search bar.
My setup:
override func viewDidLoad() {
// Setup Eureka's UITableViewStyle to `Plain` (like 'Contacts' app)
// https://github.com/xmartlabs/Eureka/issues/218
if tableView == nil {
tableView = UITableView(frame: view.bounds, style: UITableView.Style.plain)
tableView?.autoresizingMask = UIView.AutoresizingMask.flexibleWidth.union(.flexibleHeight)
tableView.cellLayoutMarginsFollowReadableWidth = false
}
// *now* call super.
super.viewDidLoad()
// Add search bar
searchController.searchResultsUpdater = self
searchController.obscuresBackgroundDuringPresentation = false
definesPresentationContext = true
// Place the search bar in the navigation bar.
self.navigationItem.searchController = self.searchController
self.navigationItem.hidesSearchBarWhenScrolling = false
}