ios-uisearchcontroller-objc
ios-uisearchcontroller-objc copied to clipboard
Crash When Search Text was cleared
Follow the actions below to replicate the crash:
In the search bar type: "ad". Click X to clear the text. Click out of the search menu, then click on any cell after the "ad".
You'll get a list index out of bounds. My fix was to eliminate the first if statement in updateSearchResultsForSearchController and always update the tableSections and tableSectionsAndItems