The first of these methods
Cons: After dialing the method, the phone will not return to the application when it hangs up, it will stay in the call log interface
Nsurl *url = [Nsurl urlwithstring:@ "tel//185------"];
[UIApplication shareapplication] openurl:url];
The second method (Apple private API) Audit will be problematic
when a call is made, the user will be dialed and returned to the application when the phone is hung up.
Nsurl *url = [Nsurl urlwithstring:@ "telprompt://185------"];
[UIApplication shareapplication] openurl:url];
The third is to use WebView to load the URL, after the broadcast can automatically return to the application
Note: This webView must not be added to the interface, or it will block other interfaces
@property (Nonatomic,strong) UIWebView * WebView;
If(_webview! = nil){
_webview = [UIWebView alloc] Initwithframe:cgrectzero];
}
[_webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:@ "tel://185------"];
The implementation of dialing and calling in iOS development