I've making practises to use iOS 8 new features - UISearchController to display my tableView and result. But something strange happened. It seems like the searchBar is transparent.
Yes, the searchBar is overlapping with the tableView. I've search a lot in SO, but no help.
My implementation in viewDidLoad
self.myTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; _myTableView.delegate = self; _myTableView.dataSource = self; [self.view addSubview:_myTableView]; self.mySearchController = [[UISearchController alloc] initWithSearchResultsController:nil]; _mySearchController.searchResultsUpdater = self; _mySearchController.dimsBackgroundDuringPresentation = NO; _mySearchController.hidesBottomBarWhenPushed = YES; _mySearchController.hidesNavigationBarDuringPresentation = YES; _mySearchController.searchBar.searchBarStyle = UISearchBarStyleMinimal; [_mySearchController.searchBar sizeToFit]; self.myTableView.tableHeaderView = self.mySearchController.searchBar; Did I miss something important?