开发者

UISearchBar is hidding in ipad where as in iphone it is working properly

开发者 https://www.devze.com 2023-01-20 03:15 出处:网络
I have designed an application for iphone/ipad. My problem is that I am using single RootViewController for showing Cate开发者_开发问答gory and Subcategory.

I have designed an application for iphone/ipad. My problem is that I am using single RootViewController for showing Cate开发者_开发问答gory and Subcategory.

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

[self.navigationController popViewControllerAnimated: YES];

But in ipad my searchbar get hidden under the navigation bar.Dont know what to do.want to show my searchbar at the same place as it was placed beneath navigation bar ContentOffset is 44.

-(void)viewWillAppear


Just got The Solution

First when the canel button is pressed reload the table [self.tableView reloadData]; then at which index in the table you wanna to go from secondviewcontroller to firstviewcontroller.

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

Necessary if selecting row in -viewDidLoad

[self.tableView selectRowAtIndexPath: indexPath animated: YES scrollPosition: UITableViewScrollPositionTop];

0

精彩评论

暂无评论...
验证码 换一张
取 消