问题
In my application, there is an option to make a call when the user taps a phone number. I'm implementing this as shown below:
if let url = URL(string:"tel://\(String(describing: Util.checkForNullString(contactNo)))"), UIApplication.shared.canOpenURL(url){
if #available(iOS 10, *) {
UIApplication.shared.open(url)
} else {
UIApplication.shared.openURL(url)
}
}
I want to do another action soon after the user finishes the call. But how to get notified when the call is finished ?
来源:https://stackoverflow.com/questions/50435038/how-to-detect-a-call-made-using-openurl-is-ended-in-ios