Search bar overlaps with status bar on iOS 11 : <p>I am using a UISearchController and a UISearchResultsController to implement search functionality.</p>

<p>MySearchResultsController implements UISearchResultsUpdating and UISearchBarDelegate:</p>

<pre><code>override open func viewDidLoad() {
    super.viewDidLoad()
    self.edgesForExtendedLayout = [];
    self.automaticallyAdjustsScrollViewInsets = false;
}
</code></pre>

<p>I display the searchbar in the tableHeader like this in MyTableViewController:</p>

<pre><code>- (void)viewDidLoad {
    [super viewDidLoad];

    self.searchController = [[UISearchController alloc] initWithSearchResultsController:self.searchResultsController];
    self.searchController.searchResultsUpdater = self.searchResultsController;
    self.searchController.searchBar.delegate = self.searchResultsController;
    self.searchController.searchBar.scopeButtonTitles = @[NSLocalizedString(@"SEARCH_SCOPE_TEMPERATURES", nil), NSLocalizedString(@"SEARCH_SCOPE_KNOWHOW", nil)];
    self.tableView.tableHeaderView = self.searchController.searchBar;
    self.definesPresentationContext = YES;
}
</code></pre>

<p>This worked perfectly before, but under iOS 11 the search bar overlaps with the status bar as soon as I tap into it (see screenshots). I tried lots of different things to get it to display correctly but haven't found a solution yet.</p>

<p><a href="https://i.stack.imgur.com/eC4lt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eC4lt.png" alt="enter image description here"></a></p>
