标签:
NSString *allString = [NSString stringWithFormat:@"tel:10086"];//注意电话号码不能包含空格,包含空格的电话号码拨打没有反应
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:allString]];
示例:
NSString *num = [[NSString alloc] initWithFormat:@"tel:%@",phone];
num = [num stringByReplacingOccurrencesOfString:@" " withString:@""];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:num]];
标签:
原文地址:http://www.cnblogs.com/wobuyayi/p/5695866.html