Guest User

Untitled

a guest
Nov 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. class AppDelegate: NSObject, NSApplicationDelegate {
  2.  
  3. @IBOutlet weak var window: NSWindow!
  4. var webView: WKWebView!
  5.  
  6. func applicationDidFinishLaunching(_ aNotification: Notification) {
  7. webView = WKWebView(frame: .zero, configuration: WKWebViewConfiguration())
  8. webView.navigationDelegate = self
  9. }
  10. }
  11.  
  12. extension AppDelegate: WKNavigationDelegate {
  13. func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
  14. print("web view process did terminate")
  15. webView.reload()
  16. }
  17. }
Add Comment
Please, Sign In to add comment