首页 > 移动平台 > 详细

iOS 打电话Demo

时间:2014-09-11 09:41:52      阅读:283      评论:0      收藏:0      [点我收藏+]
#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

原文:http://blog.csdn.net/mhtios/article/details/39201749

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!