Good Morning,
I'm hoping someone would be able to shed some light on how i can switch from a ViewController nested in a tab bar controller to another ViewController nested in a navigation controller nested in the tab bar controller, and then scroll the table view in the section navigation controller to a specific section.
I have found at least what i need to switch the tab bar controllers with
[self.applicationTabBarController setSelectedIndex:1];
and i am able to get a reference to the second view controller with
UINavigationController *secondTabNavController = (UINavigationController *)[[self.applicationTabBarController viewControllers] objectAtIndex:1];
MyViewController *myViewController = (MyViewController *)[[ordersNav viewControllers] objectAtIndex:0];
But what i am unclear about is how i can scroll the UITableView to the specific section. I tried
NSIndexPath *myPath = [NSIndexPath indexPathForRow:0 inSection:3];
[myViewController.ordersTableView scrollToRowAtIndexPath:myPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
Assuming of course, that the second view has been loaded, and has a section 3.
And lastly, my first view controller calls the above code that resides in the app delegate.
Thank you.