Wednesday 15 April 2015

ios - Force UIWebView to redraw? -


Is there any technology to redefine UIWebView automatically? I have tried setNeedsDisplay and setNeedsLayout on UIWebView and its UIScrollView, but neither has worked. After getting the answer, the correct answer was found in

. The key to redrawing itself was to tell the subtabs of the scrollView of UIWebView - especially UIWebBrowserView .

  - (zero) BallrudineWebview: (UIWebView *) Webview {NSArray * views = webView.scrollView.subviews; {UIView * view = views [i] for (int i = 0; i & lt; views.count; i ++); // if ([NSStringFromClass ([View class]) is EqualToString: @ "UIWebBrowserView"]] {{Visual SettingsDisplayPlain: webView.bounds]; // webkit repeat, usually fast [view setline layout]; // webkit relayut (slow down color) // due radra and amp; Relayout * full * UIWebView, onscreen and off, usually intensive [viewNeedsDisplay view]; [Set set layout]; // break; // If if statement (thanks jake) in the case of glass}}}   

I have saved the statement and commented to avoid Reliance at UIWebBrowserView The name of the class is not changed without it, it hits all those UIVOs which are in ScrollAview, which is not really a problem at this point (no significant overhead expenditure) but can always change.

Edit:

In some cases, the following snippet of JavaScript will be done in the same / similar manner:

 < Code> window.scrollBy (1, 1); Window. ScrollBy (-1, -1);   

Did you think that UIScrollView 's contentoffset will do this, but in my experience this does not always happen - for some The reason window.scrollTo is special in this regard.

Abstract:

No comments:

Post a Comment