开发者

Load last webpage UIWebView

开发者 https://www.devze.com 2023-01-05 04:06 出处:网络
How can I make a button that will open a UIWebView the the las开发者_如何学运维t page that it was on before the user closed it?

How can I make a button that will open a UIWebView the the las开发者_如何学运维t page that it was on before the user closed it?

for instance i have 2 xibs

1) my home screen

2) my webview

on my home screen i have 2 buttons

1) opens the webview to google.com

2) the second one opens the webview to the last page that it was on.


Save the URL of the last page visited in the user's NSUserDefaults DB. When the button is clicked, read the value from NSUserDefaults and navigate to that URL in the UIWebView.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号