ios - Search Bar not showing on iPhone 4S -


i'm pulling hair out one. i've created view in storyboard:

enter image description here

when i'm running on iphone 5s it's working fine, search bar displayed should. when i'm running on iphone 4s search bar isn't displayed can see in image below: enter image description here

running on emulator shows search bar correctly in either sizes. in viewdidload have following code:

- (void)viewdidload {     [super viewdidload];      [self.processtableview setdelegate:self];     [self.processtableview setdatasource:self];      self.searchcontroller = [[uisearchcontroller alloc] initwithsearchresultscontroller:nil];     self.searchcontroller.searchresultsupdater = self;     self.processtableview.tableheaderview = self.searchcontroller.searchbar;      self.definespresentationcontext = yes; } 

i found out issue related line self.processtableview.tableheaderview = self.searchcontroller.searchbar; don't understand why. have idea of what's going on here?

have tried
self.definespresentationcontext = yes;

this how implement it:

  self.searchcontroller =       [[uisearchcontroller alloc] initwithsearchresultscontroller:nil];   self.searchcontroller.searchresultsupdater = self;   self.searchcontroller.dimsbackgroundduringpresentation = no;    self.searchcontroller.searchbar.delegate = self;   self.tableview.tableheaderview = self.searchcontroller.searchbar;   self.definespresentationcontext = yes;   [self.searchcontroller.searchbar sizetofit];   self.searchcontroller.hidesnavigationbarduringpresentation = no; 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -