ten sposób konfiguracji i moje UIsearchController
Mój UISearchBar w UISearchController znika po rozpoczęciu wyszukiwania. Czemu?
private func setupSearchController() {
let searchResultsController = storyboard!.instantiateViewControllerWithIdentifier(DBSearchOptionControllerIdentifier) as! DBSearchOptionController
searchController = UISearchController(searchResultsController: searchResultsController)
let frame = searchController.searchBar.frame
searchController.searchBar.frame = CGRectMake(0, 50, view.bounds.size.width, 44.0)
searchController.searchResultsUpdater = self
view.addSubview(searchController.searchBar)
searchController.searchBar.text = "mmm"
view.bringSubviewToFront(searchController.searchBar)
searchController.searchBar.bringSubviewToFront(view)
}
Jak to wygląda po I zainicjować UISearchController
:
Tak to wygląda, gdy zaczynam pisać w UISearchBar:
Dlaczego mój pasek wyszukiwania znika?
To bardzo interesujące, ponieważ teraz, gdy zatrzymuję aplikację, widać, że ona tam jest, naprawdę :-) Dlaczego więc nie jest widoczna?