In Safari, when you
- Visit a very long page, e.g. w3c.org, scroll down to somewhere in the page
- Kill Safari
- Open Safari again, it will automatically remember your last position within a page
How to do this in UIWebView? Or is it possible?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest way I can think of to achieve this would be to save the web views
contentOffset.yand then set it back to what you saved the next time it is loaded.Saving this into
NSUserDefaultswill allow the value to be restored even if the app is killed, or even if an update is installed.Then to restore:
^^Untested, let me know how it works for you.