WKwebview弹框报错Attempt to present <UIAlertController> on <XX>which is already presenting (null)
来源:互联网 发布:js round 编辑:程序博客网 时间:2024/05/17 01:10
遇到一个关于WKWebview报错的问题,详细报错如下:
Warning: Attempt to present <UIAlertController: 0x14f5a9e80> on <BrowserViewController: 0x14f5a7dd0> which is already presenting (null)
详细场景如下:
wkwebview中访问h5的应用,在一个下拉框中选中其中一个元素,在浏览器端上会弹框一个提示,然后进行下一步操作!但在iPad端,则报了以上的错误!
分析:
这个原因是,下拉框在IOS的实现上,也是用弹框实现的~ 只是不同的封装而已!这时候你在已经有一个弹框的情况下,再次弹框就会出了这个问题!
解决方案:
1.先关掉下拉框,再来展示另外一个弹框
2.换另外一种交互方案,不使用弹框(我选择了这种)
题外话:
stackoverflow 是程序员的好武器~ 要用好
参考:http://stackoverflow.com/questions/41326654/attempt-to-present-uialertcontroller-on-view-controller-which-is-already-present
0 0
- WKwebview弹框报错Attempt to present <UIAlertController> on <XX>which is already presenting (null)
- Warning: Attempt to present <...> on <…> which is already presenting null
- 项目中遇到的问题(一)弹出UIAlertController 时出现 Warning: Attempt to present * on * which is already presenting
- Warning: Attempt to present UINavigationController on NavigationController which is already presenti
- Warning: Attempt to present <UIImagePickerController: 0x292b400> on xxx which is already presenti
- iOS - 解决Warning: Attempt to present <UIImagePickerController: 0x7f9ba106a000>which is already presen
- iOS - 报错 Warning: Attempt to present <xx: xx> on <xx: xx> whose view is not in the window hierarchy!
- Warning: Attempt to present xx on yy whose view is not in the window hierarchy!
- xcode编译Warning: Attempt to present xx on yy whose view is not in the window hierarchy!
- 使用AlertController出现:Warning: Attempt to present <UIAlertController: 0x7a961600>
- iOS: Warning: Attempt to present <ModalViewController> on <ViewController>while a presentation is in
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present * on * whose view is not in the window hierarchy!
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- Attempt to present on whose view is not in the window hierarchy!
- 原码、补码、反码及计算机中负数的表示
- Stackoverflow使用
- oracle 时间函数
- C# int和byte之间的互转
- MySQL重置root用户密码方法
- WKwebview弹框报错Attempt to present <UIAlertController> on <XX>which is already presenting (null)
- bzoj 2119 股市的预测
- PackageManager的基本使用
- Qt5_在Qt程序中打开网页
- 机器学习笔记(六)性能度量
- 第一個servlet實現的helloworld網頁實現參考
- Qt定时器 QTimer使用
- 微信公众号基本配置时token获取失败原因及解决方法
- 用PHP调用Oracle存储过程方法