UISearchBar键盘未在ios 8设备中打开

时间:2014-10-16 07:54:17

标签: ios ipad ios8 xcode6 uisearchbar

UIsearchBar无法正常工作,点击ios 8设备中的搜索栏时键盘未打开

1 个答案:

答案 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;

工作正常