Monday, October 9, 2017

iOS 11 Search view programming changes

You may probably have in your apps a search bar, on top of a table view, that is using UISearchController.
If so, then when you upgrade to iOS 11 you might have experienced a strange behaviour and probably overlapping of your tableview. There were some announcements related to this changes and a good summary is provided here.
In brief, your search controller object should not be asigned to table view header but to the property: self.navigationItem.searchController.

What helped me to resolve this issue is the following link:
iOS 11 UISearchBar in UINavigationBar.

What is strange is that the deprecated UISearchDisplayController did not have any issues after the upgrade!

No comments:

Post a Comment