uitableview - UISearchController hides results above the search bar -


i using uisearchcontroller inside container view in uitableview. adding search bar this:

self.resultstablecontroller = [self.storyboard instantiateviewcontrollerwithidentifier:nsstringfromclass([resultviewcontroller class])];  self.searchcontroller = [[uisearchcontroller alloc] initwithsearchresultscontroller:self.resultstablecontroller]; 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.searchcontroller.searchresultsupdater = self; [self.searchcontroller.searchbar sizetofit];  self.searchcontroller.hidesnavigationbarduringpresentation = no; self.tableview.tableheaderview = self.searchcontroller.searchbar; self.resultstablecontroller.tableview.delegate = self; self.searchcontroller.delegate = self; self.searchcontroller.dimsbackgroundduringpresentation = yes; self.searchcontroller.searchbar.delegate = self; self.definespresentationcontext = no; 

see following screenshots. hides search results above search bar:

original image when searchbar not active. searchbar active , above elements hidden.

please me out why getting this?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -