ios - WkWebview contentOffset not working when settign animated false -


i need set contentoffset of wkwebview contents finished load. set webview.scrollview.setcontentoffset(offset, animated: true) inside webview didfinish navigation.

if set animated true, works when set false, webview not scroll.

how can scroll webview without animating?

- (void)webviewdidfinishload:(uiwebview *)webview {     [webview.scrollview scrollrecttovisible:cgrectmake(0.0f, 0.0f, 0.0f, 0.0f) animated:no]; } 

or can use javascript

nsstring *script = @"scrollto(0, 0)"; [webview stringbyevaluatingjavascriptfromstring:script]; 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -