How do I reload or refresh a webview

ε祈祈猫儿з 提交于 2020-01-16 08:05:30

问题


... with a button outside of the uiwebview? please see screenshot attached.

the thing is, that I have a local html site in the webview, that goes to further local web sites. I want the user to be able to get back to the "home page" of the local website by clicking on the "home" button on the top, which is not part of the uiwebview.

(my xcode status is beginner.)

thanks for help.


回答1:


You can refresh the webview by calling loadRequest method under the UIWebView class.

[webView loadRequest:[NSURLRequest requestWithURL:theURL]];

You have to pass your url in theURL. So, you will get the refreshed page.



来源:https://stackoverflow.com/questions/3950205/how-do-i-reload-or-refresh-a-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!