我在iOS 8中集成UISearchController
时收到此警告。我的项目中没有使用storyboard。
Presenting view controllers on detached view controllers is discouraged when using UISeachController iOS 8
答案 0 :(得分:6)
您需要实现UISearchControllerDelegate
这是一个例子
# pragma mark - UISearchControllerDelegate
- (void)presentSearchController:(UISearchController *)searchController
{
[self.navigationController presentViewController:searchController animated:YES completion:nil];
}
如果您有任何其他问题,请告诉我。