简体   繁体   中英

UISearchController “manual” search UI glitch

We're migrating from UISearchDisplayController to UISearchController , one feature that used to work perfectly is misbehaving a bit and I'm wondering if we're not using the API as intended.

We have a UITableViewController that uses a UISearchController and a separate results controller to display the results, on some cases when the user clicks on a cell in the original table we want to invoke the UISearchController and populate the search field with a predefined text.

There's some kind of a UI glitch that we didn't have originally when we used UISearchDisplayController

The code we used to manually invoke the search controller is:

[self.providerSearchResultsController.searchBar becomeFirstResponder];
[self.providerSearchResultsController.searchBar setText:providerName];

I couldn't find anything official in Apple documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM