调用系统电话

第一种:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://10086"]];

第二种:

UIWebView*callPhoneWebview =[[UIWebView alloc] init];
NSURL *telURL =[NSURL URLWithString:@"tel:10086"];  //(tel:// 或者 tel: 都行)
[callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
//最后添加到view上
[self.view addSubview:callWebview];

第三种(私有方法,不能通过审核):

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://10086"]];

猜你喜欢

转载自blog.csdn.net/yinxaingfu/article/details/50418718