Question

I'm working with tabBarBased Application. - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker

This method is called at the time of clicking the cancel button in iphone photo album..while clicking the cancel button i want to navigate to the another tabBar view...Please help me what should i give inside imagePickerControllerDidCancel method..

Thanks & Regards, Renuga

Was it helpful?

Solution

You can navigate to other view as usual by using navigationController push view controller if your tab having navigation controller. otherwise add other view on window. and for selecting any other tab view you can use setSelectedIndex for the tab.

If you have any problem in implementing the concept then let me know.

edit:

For selection of the tab

[appObj.tabBarController setSelectedIndex:2];

since tabBar is the part of appDelegate class so you need to make a object for AppDelegate class here.

by using

appObj=(yourApplicationAppDelegate *)[[UIApplication sharedApplication] delegate];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top