views:

27

answers:

1

I have designed an application for iphone/ipad.My problem is that I am using single RootViewController for showing Category 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

A: 

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];

Khalil86