In my iPad App I have a modal view (UIViewController with modal presentation style UIModalPresentationPageSheet)
UIViewController
UIModalPresentationPageSheet
Inside the view is a UIWeb
Swift 4
// Halt anything in progress (contentViewController as! WebViewController).webView.loadHTMLString("Yoink://", baseURL: nil)
needed in a windowController's windowShouldClose() method when I close a window