1

When i click on UISearchBar it changes its position and tableview overlaps UISearchBar .i changed its position in but its not working.

-(void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller {

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {

 CGRect statusBarFrame =  [[UIApplication sharedApplication] statusBarFrame];
 [UIView animateWithDuration:0.25 animations:^{
 for (UIView *subview in self.view.subviews)
 subview.transform = CGAffineTransformMakeTranslation(0, statusBarFrame.size.height);
    subview.frame=CGRectMake(0, -200, 320, 64);
 }];
 }

}

before clicking on Searchbar

enter image description here
After clicking on Searchbar

enter image description here

garry007
  • 49
  • 9

1 Answers1

0

Should set:

[self.navigationController setNavigationBarHidden:YES animated:YES];

Brave
  • 371
  • 1
  • 3
  • 10