NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",@"10086"]];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}else{
NSLog(@"不能打电话");
}
NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",@"10086"]];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}else{
NSLog(@"不能打电话");
}
本文标题:iOS 拨打电话
本文链接:https://www.haomeiwen.com/subject/gebmoctx.html
网友评论