Stop/reload button

This commit is contained in:
James Magahern
2020-07-28 11:37:10 -07:00
parent 5e80faac62
commit 9f506c879f
2 changed files with 17 additions and 8 deletions

View File

@@ -40,7 +40,11 @@ class BrowserViewController: UIViewController,
// Refresh button
toolbarController.urlBar.refreshButton.addAction(UIAction(handler: { action in
webView.reload()
if webView.isLoading {
webView.stopLoading()
} else {
webView.reload()
}
}), for: .touchUpInside)
// Script button