项目中用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];
-webkit-overflow-scrolling: touch;
After we removed it, we no longer had those error messages.
解决方案:
********为 WebActionDisablingCALayerDelegate 这个私有类添加方法,在后面的一次提交审核过程中,ipa文件提交失败:引用私有API(还是私有类,记不得了)。所以建议不要采用。链接
********使用WKWebview代替UIWebview
网友评论