【发布时间】:2017-08-21 06:44:59
【问题描述】:
内容加载完成后,我需要设置 WkWebView 的 contentOffset。我在 webview didFinish 导航中设置了webView.scrollView.setContentOffset(offset, animated: true)。
如果我将动画设置为true,它可以工作,但是当我将它设置为false 时,webView 不会滚动。
如何在没有动画的情况下滚动 webview?
【问题讨论】:
-
本文档可能会解释发生这种情况的原因:developer.apple.com/library/content/documentation/WindowsViews/… 当
animated: true发送一系列事件时,animated: false发送单个事件。
标签: ios swift uiscrollview wkwebview