Make phone call on iPhone and take user back to app? (UIWebView does it)

前端 未结 2 1344
说谎
说谎 2020-12-11 11:46

I used this code to make phone call:

NSString *phoneNumber = [@\"tel://\" stringByAppendingString:mymobileNO.titleLabel.text];
[[UIApplication sharedApplicat         


        
2条回答
  •  清歌不尽
    2020-12-11 12:02

    The website: http://www.raizlabs.com/dev/2014/04/getting-the-best-behavior-from-phone-call-requests-using-tel-in-an-ios-app/ has a discussion of whether to use telprompt (undocumented, Apple could potentially change the API without notice), and instead using a category that sends the number to a web view which opens it using telprompt. This has the advantage of not breaking if Apple does something odd.

提交回复
热议问题