I have a app with a website. On the website there are links to other sites and pages of the website but how can I reload the page with a button or a tabbar that it goes back to the main page from the webview
1 Answer
You can simply create two button, one to goes back and one to refresh and then connect these IBActions
:
@IBAction func doRefresh(AnyObject) {
webView.reload()
}
@IBAction func goBack(AnyObject) {
webView.goBack()
}
-
But I mean a button that go back to the main page of the webview. Jun 20, 2016 at 9:54
-
1webview dont have a "main page", it's a client to show a page or a list of page, this depend by you. You can organize a list of page in an array and force to go to the first element. Jun 20, 2016 at 9:56