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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -