This is very tricky to do reliably with UIWebView. Fortunately it’s very easy to do with WKWebView (via the
webView(_:didReceive:completionHandler:)delegate callback). You should make the switch to the modern web view API.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"