【发布时间】:2016-10-26 05:29:52
【问题描述】:
我有嵌入在 UITabBarController 中的 UIViewController。在我的PhotoViewController 上,用户可以选择添加照片并调用UIImagePickerController。用户选择照片并弹出视图后,导航栏消失。
显示导航栏。
这是UIImagePickerController 视图,看起来好像取消按钮在NavigationBar 下方。 (在这张照片中很难看到。)
UIImagePickerController 弹出并重新加载视图后,NavigationBar 消失了。
这就是我如何称呼UIImagePickerController。我继承自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];
虽然代表说不兼容。
如何纠正问题?
【问题讨论】:
标签: ios uinavigationcontroller uinavigationbar uiimagepickercontroller