我遇到了同样的问题。我发现文件上载操作表在选择一个选项时尝试自行关闭两次,这也导致模式被关闭。
一种解决方案是将
UINavigationController包含webview的子类化,并重写
dismissViewControllerAnimated以忽略它,除非它实际上有一个
presentedViewController。
像这样:
override func dismissViewControllerAnimated(flag: Bool, completion: (() -> Void)?) { if (self.presentedViewController != nil) { super.dismissViewControllerAnimated(flag, completion: completion) }}如果您不使用导航控制器,则只需在Webview中覆盖此方法即可。



