1, this method, call the end of the phone back to the original application, will stay in the address book, and is directly dialed, not pop-up hints
Nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@ "tel:%@", @ "000000000"];
NSLog (@ "str======%@", str);
[[UIApplication sharedapplication] Openurl:[nsurl Urlwithstring:str]];
2, this method, after the call will return to the original program, will also pop up hints, recommend this
Nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@ "tel:%@", @ "00000000000"];
UIWebView * Callwebview = [[UIWebView alloc] init];
[Callwebview loadrequest:[nsurlrequest Requestwithurl:[nsurl Urlwithstring:str]];
Tip: Do not add WebView to Self.view, if added will obscure the original view
Lazy Loading
if (_webview = = nil) {
_webview = [[UIWebView alloc] init];
// }
NSLog (@ "%p", _webview);
//
Nsurl *url = [Nsurl urlwithstring:@ "tel://xxxxxxx"];
Nsurlrequest *request = [Nsurlrequest Requestwithurl:url];
//
[_webview Loadrequest:request];
3, this method will also go back to the original program (note here Telprompt), will also pop-up hints
Nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@ "telprompt://%@", @ "000000000"];
NSLog (@ "str======%@", str);
[[UIApplication sharedapplication] Openurl:[nsurl Urlwithstring:str]];
Three ways to call IOS