I set my searchBar in the navigationBar. When activated it animates and the cancel button appears. I'm trying to stop animation and prevent cancel button from appearing. My story board is a tableviewController set in a navigationController.
self.searchController = [[UISearchController alloc]initWithSearchResultsController:nil];
self.searchController.searchResultsUpdater = self;
self.searchController.dimsBackgroundDuringPresentation = NO;
self.searchController.hidesNavigationBarDuringPresentation = NO;
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.navigationItem.titleView = self.searchController.searchBar;
[self.searchController.searchBar setShowsCancelButton:NO animated:NO];