标签:
DNLogFUNC
//两种方法都可以用
//这种据说是可以上appstore
NSURL *phoneURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",PhoneNumber]];
if ( !_phoneCallWebView ) {
_phoneCallWebView = [[UIWebView alloc] initWithFrame:CGRectZero];
}
[_phoneCallWebView loadRequest:[NSURLRequest requestWithURL:phoneURL]];
// // 处理电话号码
// NSString* sOriginPhoneNum = PhoneNumber;
// // 处理中文分隔符-,导致无法拨打电话
// NSMutableCharacterSet *charSet = [[NSMutableCharacterSet alloc] init] ;
// [charSet formUnionWithCharacterSet:[NSCharacterSet whitespaceCharacterSet]];
// [charSet formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]];
// [charSet formUnionWithCharacterSet:[NSCharacterSet symbolCharacterSet]];
// NSArray *arrayWithNumbers = [sOriginPhoneNum componentsSeparatedByCharactersInSet:charSet];
// NSString *numberStr = [arrayWithNumbers componentsJoinedByString:@""];
// if (!numberStr) {
// numberStr = @"";
// }
//
// // 拨打电话号码,据说上商店会被拒,欢迎分享意见. telprompt:有弹窗,tel:没弹窗。
// NSString *url = [NSString stringWithFormat:@"telprompt:%@", numberStr];
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
标签:
原文地址:http://www.cnblogs.com/soulDn/p/5669888.html