-1

我設計了一個iPhone/iPad應用程序。我的問題是,我使用單個RootViewController來顯示類別和子類別。UISearchBar隱藏在iPad中,因爲它在iPhone中正常工作

//Pop me to RootViewController Category Section From SubCategory in iphone/ipad 

[self.navigationController popViewControllerAnimated: YES]; 

但是在ipad上我的搜索欄獲取導航下隱藏bar.Dont知道該怎麼do.want顯示我在同一個地方搜索欄,因爲它被放置導航欄下方ContentOffset是44

-(void)viewWillAppear 

回答

0

剛剛得到解決方案

首先當按下按鈕時重新加載表 [self.tableView reloadData]; 然後在表中您希望從secondviewcontroller轉到firstviewcontroller的索引。

NSIndexPath * indexPath = [NSIndexPath indexPathForRow:0 inSection:0];

必要的,如果在選擇-viewDidLoad行

[self.tableView selectRowAtIndexPath:indexPath動畫:是的scrollPosition:UITableViewScrollPositionTop];

相關問題