How to set content offset and content size in a UIWebView

前端 未结 5 2218
抹茶落季
抹茶落季 2020-12-05 14:48

I have had to change a UIScrollView into a UIWebView due to formatting reasons.

There is a problem though that I need to be able to get the

5条回答
  •  暖寄归人
    2020-12-05 15:24

    Use JavaScript.

    I think that the next line should do the magic:

    [webView stringByEvaluatingJavaScriptFromString:@"window.scroll(0,0)"];
    

提交回复
热议问题