I had been using the following code prior to iOS 11 to customize the appearance of the UISearchController search bar:
UISearchController
var searchController = UISearc
Moving the call to setDefaultSearchBar into viewDidAppear should fix this.
setDefaultSearchBar
viewDidAppear