On iOS, opening a tel
link via
func open(_ url: URL, options: [String : Any] = [:], completionHandler completion: ((Bool) -> Void)? = nil)
or the older (for iOS 9 and older)
func openURL(_ url: URL) -> Bool
will make iOS display an UIAlertViewController
and present it to the user on your behalf.
I can't seem to find a way to get a handle on this UIAlertViewController
. I'd like to know when it's showing and when it's not.
Usually, if you instantiate and present a UIAlertViewController
yourself, you can see if its displaying because
self.presentedViewController
will not be nil
.
Essentially, there is a behavior I'd like to "pause" when a system-displayed alert is shown (such as the tel
prompt) and then "resume" when it is dismissed.
I've looked around Apple's documentation and cannot seem to find anything on this. Any help is greatly appreciated!