IOS 拨打电话
注意:在模拟器中无法模拟拨号
NSString *phone = @"88888888";
if (phone != nil) {
NSString *telUrl = [NSString stringWithFormat:@"telprompt:%@",phone];
NSURL *url = [[NSURL alloc] initWithString:telUrl];
[[UIApplication sharedApplication] openURL:url];
}
UIWebView*callWebview =[[UIWebView alloc] init]; NSString *telUrl = [NSString stringWithFormat:@"tel:%@",phone]; NSURL *telURL =[NSURL URLWithString:telUrl];// 貌似tel:// 或者 tel: 都行 [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]]; //记得添加到view上 [self.view addSubview:callWebview];
posted on 2014-01-23 15:06 MoreNotepad++ 阅读(103) 评论(0) 收藏 举报
浙公网安备 33010602011771号