Reputation: 3648
I want to use UIWebView
to show a website, but it has things at the top I do not wish to show. How can I make the UIWebView
immediately scroll to a certain part of the website?
Upvotes: 2
Views: 1773
Reputation: 22641
UIWebView
has a scrollView
property:
You can set its content offset like this:
webView.scrollView.contentOffset = CGPoint(0, 200)
An alternative might be to add the ID of a specific element to the URL, like this: https://stackoverflow.com/#h-top-questions
Upvotes: 4