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
After clicking on Searchbar