I am trying to position my UISearchBar directly below my UINavigationBar, but I am having problems when it does not appear at all. I am using iOS8 new searchController.
self.searchController = [[UISearchController alloc] initWithSearchResultsController:searchResultsController];
self.searchController.searchResultsUpdater = self;
self.searchController.searchBar.frame = CGRectMake(self.searchController.searchBar.frame.origin.x, self.searchController.searchBar.frame.origin.y, self.searchController.searchBar.frame.size.width, 44.0);
self.salesTableView.tableHeaderView = self.searchController.searchBar;
I am currently using what correctly adds it to the UITableView header, but the problem is that it scrolls the table, which is not what I want. I want it to be above my desk, so it was used instead and tried it, but it seems like it has disappeared now if I do not use the value right?
self.searchController = [[UISearchController alloc] initWithSearchResultsController:searchResultsController];
self.searchController.searchResultsUpdater = self;
self.searchController.searchBar.frame = CGRectMake(0, 0, self.searchController.searchBar.frame.size.width, 44.0);
source
share