我正在使用tabBarBased应用程序。在点击其中一个tabBarButton时,它会打开相册。在相册中,顶部有一个取消按钮(navBar)对吗?这里我想执行动作事件取消按钮单击...同时单击取消按钮我想转到另一个tabBar视图...
请帮我解决这个问题......
提前感谢您的考虑和努力...... 问候, Renuga
答案 0 :(得分:3)
这是UIImagePickerControllerDelegate的类定义:
@protocol UIImagePickerControllerDelegate<NSObject>
@optional
// The picker does not dismiss itself; the client dismisses it in these callbacks.
// The delegate will receive one or the other, but not both, depending whether the user
// confirms or cancels.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_NA,__MAC_NA,__IPHONE_2_0,__IPHONE_3_0);
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info;
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
@end
我认为上面提到的方法之一就是你需要的:
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
答案 1 :(得分:0)
将UITabBarController的selectedViewController属性设置为要切换到的视图控制器。将新视图控制器分配给此属性会更改当前显示的视图,还会在选项卡栏中选择相应的选项卡。