项目中用Webview加载H5页面,遇到的一个问题.
WebKit discarded an uncaught exception in the webView:willRemoveScrollingLayer:withContentsLayer:forNode: delegate:-[WebActionDisablingCALayerDelegate willBeRemoved]: unrecognized selector sent to instance 0x61800001a5e0
去网上,总结大家的反馈,有这些情况导致了:
********[WebActionDisablingCALayerDelegate willBeRemoved]异常 原因是touch和鼠标事件冲突。
******** This is happening when I change some constraints on myUIWebViewand then call:
self.webViewWidthConstraints.constant=newWidth;
[self.webView setNeedsLayout];
[self.webView layoutIfNeeded];
链接
********Not sure if this is your case, but I also started seeing this problem on iOS 8 and we tracked it down to the usage of the following CSS property on an iframe:
-webkit-overflow-scrolling: touch;
After we removed it, we no longer had those error messages.
Note: in my case, it didn't happen in response to changing any constraints, but rather it happened while we were navigating through the HTML.
********Not sure if this is your case, but I also started seeing this problem on iOS 8 and we tracked it down to the usage of the following CSS property on an iframe:
********I found that by adding "-webkit-transform: translateZ(0px);" to the scrollable content (I have a div inside my scrollable container), it fixed the issue for me. Hope this helps.
解决方案:
********为 WebActionDisablingCALayerDelegate 这个私有类添加方法,在后面的一次提交审核过程中,ipa文件提交失败:引用私有API(还是私有类,记不得了)。 所以建议不要采用。链接
********使用WKWebview代替UIWebview
最后编辑于 :2017.12.09 02:09:27
©著作权归作者所有,转载或内容合作请联系作者 【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。 平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。