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:

please me out why getting this?
Comments
Post a Comment