1

У меня есть UIViewController, встроенный в UITabBarController. Один мой «PhotoViewController» пользователь может выбрать, чтобы добавить фотографию, и вызывается UIImagePickerController. После того, как пользователь выберет фотографию и откроется вид, панель навигации исчезнет.UINavigationBar исчезает после вывода UIImagePickerController

Отображается панель навигации.

Start

Это мнение UIImagePickerController, он выглядит так, как если кнопка CANCEL находится под Панель навигации. (Это трудно увидеть в этой картине.)

enter image description here

После UIImagePickerController выталкивается и вид перезагружается, то Панель навигации исчезла.

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 поверх текущего вида.

Смежные вопросы