调用打电话的方法总结

1、有提示框

NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"123456"];

UIWebView * callWebview = [[UIWebView alloc] init];

[callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];

[self.view addSubview:callWebview];

2、直接拨打

NSMutableString *str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"123456"];

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];

你可能感兴趣的:(调用打电话的方法总结)