I have UIViewController that is embedded in a UITabBarController. On my PhotoViewController
the user can select to add a photo and the UIImagePickerController
is called. After the user selects the photo and the view is popped, the Navigation Bar disappears.
The Navigation bar is shown.
This is the UIImagePickerController
view, It looks as if the CANCEL button is under the NavigationBar
. (It is hard to see in this picture.)
After the UIImagePickerController
is popped and the view is reloaded, the NavigationBar
is gone.
Here is how I call the UIImagePickerController
. I am inheriting from UIImagePickerControllerDelegate
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];
Though the delegate is saying is it incompatible.
How do I correct issue?
I added
imagePickerController.modalPresentationStyle = UIModalPresentationFullScreen;
imagePickerController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
And that seemed to put the imagePickerController on top of the current view.