How to detect a call made using openUrl() is ended in ios

回眸只為那壹抹淺笑 提交于 2019-12-11 17:56:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!