1

私はUITabBarControllerに埋め込まれたUIViewControllerを持っています。ユーザーが写真を追加するために選択できる1つの「PhotoViewController」とUIImagePickerControllerが呼び出されます。ユーザーが写真を選択して表示がポップされると、ナビゲーションバーが消えます。UIIavigationBarがUIImagePickerControllerがポップされた後に消えます

ナビゲーションバーが表示されます。

Start

これは、キャンセルボタンがNavigationBarの下にあるかのように見え、UIImagePickerController図です。 (それがこの絵で見ることは困難である。)

enter image description here

UIImagePickerControllerがポップされ、ビューが再ロードされた後、NavigationBarがなくなっています。ここで

enter image description here

私はUIImagePickerControllerを呼び出す方法です。それは互換性がありませんデリゲートが言っているけど、私はUIImagePickerControllerDelegate

enter image description here

UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; 
    imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext; 
    imagePickerController.sourceType = sourceType; 
    imagePickerController.delegate = self; 

    if (sourceType == UIImagePickerControllerSourceTypeCamera) { 
     imagePickerController.showsCameraControls = YES; 
    } 

    self.imagePickerController = imagePickerController; 
    [self presentViewController:self.imagePickerController animated:YES completion:nil]; 

から継承しています。

enter image description here enter image description here

どのように私はこの問題を修正するのですか?

答えて

0

これは、これを行うには正しい方法ではないかもしれないが、私は

imagePickerController.modalPresentationStyle = UIModalPresentationFullScreen; 
imagePickerController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; 

を追加し、それが現在のビューの上にimagePickerControllerを置くように見えました。

関連する問題