or : navigation controller must not change between -setActive:YES and -setActive:NO
在使用UISearchDisplayController点击searchbar的取消以及遮盖灰色部分的时候有调用popViewControllerAnimated出现
只需要在界面在下面2个地方处理:
//修复点击遮盖灰色部分
-(void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller
{
[self.navigationController popViewControllerAnimated:YES];
[self.searchDisplayController setActive:NO animated:NO];
}
//修复点击取消
- (void)viewWillDisappear:(BOOL)animated {
[self.searchDisplayController setActive:NO animated:YES];
[super viewWillDisappear:animated];
}