加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – WKWebview无法在呈现的UINavigationController上打开WKAc

发布时间:2020-12-14 17:23:43 所属栏目:百科 来源:网络整理
导读:我的WKWebViewController有问题. 我用这段代码来表示: SRWebWKViewController *webcontroller = [self.storyboard instantiateViewControllerWithIdentifier:@"SRWebViewControllerWKWebview"]; UINavigationController *navController = [[UINavigationCon
我的WKWebViewController有问题.

我用这段代码来表示:

SRWebWKViewController *webcontroller = [self.storyboard instantiateViewControllerWithIdentifier:@"SRWebViewControllerWKWebview"];
    UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:webcontroller];
    [self presentViewController:navController animated:YES completion:nil];

它显示正确,但当我按任何链接时,我收到此错误:

Warning: Attempt to present <WKActionSheet: 0x7fc4f4c6f5e0> on <UINavigationController: 0x7fc4f4b9d9e0> whose view is not in the window hierarchy!

我在网上搜索了很多,但我找不到解决问题的任何解决方案

提前致谢

解决方法

这是UIKit从iOS 8.0到至少iOS 9.3.1的一个错误.

我们在PSPDFKit中已经看到过这个问题,在调查了UIKit组件和WKWebView源之后,我们发现了一个仍然很糟糕但不具有侵入性的解决方法.

主要策略是选择性并及时应用解决方法 – 然后再次清理.你可以在这里阅读源代码:

https://gist.github.com/steipete/b00fc02aa9f1c66c11d0f996b1ba1265

请注意0??7002,这样就可以及时修复iOS 10.(该漏洞自iOS 8开始存在,并且首次在iOS 8b5上报告.)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读