フォトアルバムのアクションイベントはiPhoneのキャンセルボタンをキャンセルします
-
11-10-2019 - |
質問
Tabbarbasedアプリケーションで作業しています。タブバットンの1つをクリックすると、フォトアルバムが開きます。フォトアルバムでキャンセルボタンがあります(navbar)右??クリックしてください...キャンセルボタンをクリックすると、別のTabbarビューに移動します...
これをするのを手伝ってください...
ご検討と努力をよろしくお願いします...よろしく、ルネガ
解決
これは、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
上記の方法の1つは、必要なものだと思います。
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
他のヒント
UITABBARCONTROLLERのSelectedViewControllerプロパティを、切り替えたいビューコントローラーに設定します。このプロパティに新しいビューコントローラーを割り当てると、現在表示されているビューが変更され、タブバーの適切なタブも選択します。
所属していません StackOverflow