#pragma mark - AddressBookCellDelegate
- (void)didClickCallButtonAtIndexPath:(NSIndexPath *)indexPath
{
//可以实现拨打前弹出提示。并且拨打完以后会回到原来的应用
NSDictionary *dic = self.names[self.titles[indexPath.section]][indexPath.row];
NSString *phone = dic[@"phoneNumber"];
NSString *str=[NSString stringWithFormat:@"tel:%@", phone];
UIWebView *callWebview = [[UIWebView alloc] init];
[callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
[self.view addSubview:callWebview];
[callWebview release];
}
iOS 打电话Demo
最新推荐文章于 2018-12-06 17:40:48 发布