how to navigate to another view with cancel button click on iphone photo album
-
11-10-2019 - |
Pergunta
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
Solução
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];
Outras dicas