kładę paska wyszukiwania wewnątrz tableHeaderView. Wszystko działa dobrze na iPhone 6, ale na iPhone 5s dostaję ten dziwny wynik?searchBar kryciu przez sekcję nagłówka widzenia
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
tableView.sectionIndexColor = Constants.Colors.ThemeGreen
tableView.sectionIndexBackgroundColor = UIColor.clearColor()
tableView.sectionIndexTrackingBackgroundColor = UIColor.clearColor()
tableView.contentInset = UIEdgeInsetsMake(0, 0, CGFloat(Constants.Dimensions.TabBarHeight), 0)
resultSearchController = UISearchController(searchResultsController: nil)
resultSearchController.searchResultsUpdater = self
resultSearchController.dimsBackgroundDuringPresentation = false
resultSearchController.definesPresentationContext = true
tableView.tableHeaderView = resultSearchController.searchBar
resultSearchController.searchBar.sizeToFit()
//Fetch data for the first time
do{
try fetchedResultsController.performFetch()
listHeaderView?.count = "\(fetchedResultsController.fetchedObjects!.count)"
}catch{
print("Error - Couldn't fetch list")
}
- UWAGA: Używam NSFetchedResultController do pobierania danych
ja wciąż stoi ten problem –