Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIWebView throwing exception for [WebActionDisablingCALayerDelegate setBeingRemoved:]

When running against iOS 8, I began to see the following exception coming from the deep bowels of UIWebView:

[WebActionDisablingCALayerDelegate setBeingRemoved:]: unrecognized selector sent to instance 0x167ee900

* WebKit discarded an uncaught exception in the webView:willRemoveScrollingLayer:withContentsLayer:forNode: delegate: -[WebActionDisablingCALayerDelegate setBeingRemoved:

This is happening when I change some constraints on my UIWebView and then call:

 self.webViewWidthConstraints.constant = newWidth;  [self.webView setNeedsLayout];  [self.webView layoutIfNeeded]; 

(This is so that the webview's content is re-rendered to fit its width correctly).

Luckily the exception is discarded, so the app isn't crashing. Why is this happening, and is there any way to prevent it?

like image 515
Arie Litovsky Avatar asked Sep 17 '14 15:09

Arie Litovsky


1 Answers

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.

like image 169
maidbarion Avatar answered Sep 26 '22 01:09

maidbarion