Using becomeFirstResponder causes cancel button to not work
问题 I have a UISearchDisplayController (searchDisplayCtr) and a UISearchBar (searchBar). I am trying to give focus to the search bar and bring up the keyboard when I click the search icon in the alphabet scroll on the right. If I include, [self.searchDisplayCtr setActive:YES]; [self.searchDisplayCtr.searchBar becomeFirstResponder]; It brings up the keyboard and selects the search bar but the cancel button does not work consistently. I have tried resigning first responder, setting active to NO and