0
我已經使用以下代碼在我的iPad應用程序的表格中添加了UISearchBar。該表位於我的分割視圖控制器的左側。以編程方式添加UISearchBar - Bar在啓動時關閉屏幕 - iPad
問題是,當應用程序啓動搜索欄是奇怪的離屏幕左 - 你可以看到它的最後幾個像素。如果你點擊它,或者向下滾動並返回,它會自行恢復,看起來應該如此。
任何人都可以提出如何解決這個問題嗎?
感謝
searchBar = [[UISearchBar alloc] init];
self.tableView.tableHeaderView = searchBar;
searchController = [[UISearchDisplayController alloc]
initWithSearchBar:searchBar
contentsController:self];
searchBar.delegate = self;
searchController.delegate = self;
searchController.searchResultsDelegate=self;
searchController.searchResultsDataSource=self;