错误现象,在UIwebview 使用input file 当前控制器崩溃问题
报错信息:
Warning: Attempt to present <UIDocumentPickerViewController: 0x161744e40> on <ACEUINavigationController: 0x160896a00> whose view is not in the window hierarchy!
解决方案:在加载H5页面的控制器的父控制器中,重写模态方法,拦截回退,亲测可行,此问题在wkwebview中未出现:
-(
void
)dismissViewControllerAnimated:(
BOOL
)flag completion:(
void
(^)(
void
))completion
{
if
(
self
.presentedViewController)
{
[
super
dismissViewControllerAnimated:flag completion:completion];
}
}