2016-07-15 15 views
0

タップすると右にプッシュするUISearchController内にUISearchBarがあります。UISearchControllerのUISearchBarがタップされたときに右にスリップする

これは、初期セットアップ以下 Search before tapping

は、ユーザーが押したら、私はセットアップにのUIViewController

//Set self object to recieve all the updates of UISearchResultsController 
self.searchResultsUpdater = self; 


//Hide navigation bar during presentation of the UISearchController. 
self.hidesNavigationBarDuringPresentation = YES; 

//set delegates to UISearchBar and UISearchController 
self.delegate = self; 
self.searchBar.delegate = self; 

//Set scope bars that does not exist 
self.searchBar.scopeButtonTitles = [NSArray array]; 

//Some additional settings that can be configured 

self.context.definesPresentationContext = YES; 
self.dimsBackgroundDuringPresentation = NO; 

[self.searchBar sizeToFit]; 

self.tableView.tableHeaderView = self.searchBar; 

self.context.edgesForExtendedLayout = UIRectEdgeTop; 
self.searchBar.clipsToBounds = YES; 

内の検索バーを使用するコードの後に​​検索バーがどのように見えるかです検索バー、それはこのように動作します。 After tapping the search bar it pushes to the right

他のコントローラはすべて正常に動作しています。それは奇妙な方法で動作し続けるただのコントローラです。

このアプリケーションはiPhoneとiPadの両方をサポートしていますが、iPhone上ではうまく機能しているようですが、iPad上では不思議な動作をします。

答えて

0

私自身で問題を解決できました。私は何をしていたことだった。

self.definesPresentationContext = false; 

とビューが却下された後、それを削除する

self.searchController.active = false; 
関連する問題