Creating a transparent navigation bar no longer works with ios 11.
I get this black bar at the top because the table view doesn't come under the bar anymore (the insets in the storyboard are set properly to start from 0)
Any ideas why?
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
if you have used tableView,add code:
if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}