1 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 hints2Nsmutablestring * str=[[nsmutablestring alloc] Initwithformat:@"tel:%@",@"186xxxx6979"];3 //NSLog (@ "str======%@", str);4 [[uiapplication sharedapplication] Openurl:[nsurl Urlwithstring:str]];5 6 7 2, this method, after the call will return to the original program, will also pop up hints, recommend this8Nsmutablestring * str=[[nsmutablestring alloc] Initwithformat:@"tel:%@",@"186xxxx6979"];9UIWebView * Callwebview =[[UIWebView alloc] init];Ten [Callwebview loadrequest:[nsurlrequest Requestwithurl:[nsurl Urlwithstring:str]]; One [Self.view Addsubview:callwebview]; A [Callwebview release]; - [str release]; - the - - - 3, this method will go back to the original program (note the telprompt here), will also pop-up hints +Nsmutablestring * str=[[nsmutablestring alloc] Initwithformat:@"telprompt://%@",@"186xxxx6979"]; - //NSLog (@ "str======%@", str); +[[UIApplication sharedapplication] Openurl:[nsurl Urlwithstring:str]];
Three ways to call IOS