UIsearchBar无法正常工作,点击ios 8设备中的搜索栏时键盘未打开
答案 0 :(得分:0)
搜索栏出现在模型视图控制器中,我正在实现这样
searchObj = [[ICMOSearchViewController alloc]initWithNibName:@"ICMOSearchViewController" bundle:nil];
searchObj.modalPresentationStyle = UIModalPresentationFormSheet;
searchObj.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:searchObj animated:YES completion:nil];
searchObj.modalPresentationStyle = UIModalPresentationFormSheet;键盘没有出现,应用程序被挂起。
现在我正在改为
searchObj.modalPresentationStyle = UIModalPresentationPageSheet;
工作正常