IOS call Function
// The first call Method
-(IBAction) firstCall :( id) sender {
NSString * phone = @" 18749627117 ";
If (phone! = Nil ){
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: [NSString stringWithFormat: @ "tel: % @", phone]; // use this method, after the call, the contact list is displayed.
// [[UIApplication sharedApplication] openURL: [NSURL URLWithString: [NSString stringWithFormat: @ "telprompt: // % @", phone]; // if this method is used, a pop-up box will pop up before you call the phone and ask if you want to make a call. After you finish the call, you will return to the main program. Some people say this method may be invalid and cannot pass the review.
}
}
// Method 2
-(IBAction) secondCall :( id) sender {
NSString * str = [NSString stringWithFormat: @ "tel: % @", @ "18749627117"];
UIWebView * callWebView = [[UIWebView alloc] init];
[CallWebView loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: str];
[Self. view addSubview: callWebView]; // you can skip this step.
}