美文网首页
调用打电话的方法总结

调用打电话的方法总结

作者: 一笔春秋 | 来源:发表于2017-03-03 09:26 被阅读18次

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]];

相关文章

网友评论

      本文标题:调用打电话的方法总结

      本文链接:https://www.haomeiwen.com/subject/nlslgttx.html