最近在写项目的时候,调取相机拍照和选择照片后,突然发现UIImagePickerController的实例调用dimiss之后不是返回的推出UIImagePickerController的视图控制器,而是返回到该navigationctroller控制的根类视图。
解决方案:
设置 UIImagePickerController 的 modalPresentationStyle 属性为 custom即可。
imagePickerController.modalPresentationStyle = UIModalPresentationCustom;

博主在项目中发现,调用相机拍照或选照片后,UIImagePickerController实例调用dimiss未返回推出它的视图控制器,而是返回navigationctroller控制的根类视图。解决方案是将UIImagePickerController的modalPresentationStyle属性设为custom。
4580

被折叠的 条评论
为什么被折叠?



