【发布时间】:2014-08-04 17:05:29
【问题描述】:
我在 UIViewController 中创建了一个 UISearchDisplayController,它位于 UINavigationController 中。
我用的是普通的初始化:
self.displayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
self.displayController.searchResultsDataSource = self;
self.displayController.searchResultsDelegate = self;
self.displayController.delegate = self;
self.displayController.displaysSearchBarInNavigationBar = YES;
这段代码运行良好,在 iPhone 中显示暗淡的视图,但在 iPad 上它什么也不做。我在网上看,大多数人都说它应该自动显示一个带有结果的弹出窗口。我根本看不到这种情况发生。我是否必须为 iPad UIViewControllers 以不同的方式执行此操作?
我正在以编程方式创建这一切。
【问题讨论】: