Call-Method 1
The simplest and most straightforward way: jump directly to the dial-up interface
Nsurl *url = [Nsurl urlwithstring:@ "tel://10010"];
[[UIApplication sharedapplication] openurl:url];
Disadvantages
After the call, will not automatically return to the original application, directly in the Call log interface
Call-Method 2
Before dialing, the box asks the user whether to dial or not and automatically returns to the original application after dialing out.
Nsurl *url = [Nsurl urlwithstring:@ "telprompt://10010"];
[[UIApplication sharedapplication] openurl:url];
Disadvantages
Because it is a private API, it may not be audited by
Call-Method 3
Create a UIWebView to load the URL and automatically go back to the original app when you're finished dialing
if (_webview = = nil) {
_webview = [[UIWebView alloc] Initwithframe:cgrectzero];
}
[_webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:@ "tel://10010"]];
Note: This webview must not be added to the interface, or it will block other interfaces
IOS Dev Call feature