Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2604524
  • 博文数量: 877
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 5920
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-05 12:25
个人简介

技术的乐趣在于分享,欢迎多多交流,多多沟通。

文章分类

全部博文(877)

文章存档

2021年(2)

2016年(20)

2015年(471)

2014年(358)

2013年(26)

分类: iOS平台

2015-10-20 18:27:57

http://blog.csdn.net/ouy_huan/article/details/30506925
1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示
NSMutableString * str=[[NSMutableString allocinitWithFormat:@"tel:%@",@"186xxxx6979"];
    
//            NSLog(@"str======%@",str);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
    

2,这种方法,打完电话后还会回到原来的程序,也会弹出提示,推荐这种
NSMutableString * str=[[NSMutableString allocinitWithFormat:@"tel:%@",@"186xxxx6979"];
    
UIWebView * callWebview = [[UIWebView allocinit];
    [callWebview 
loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
    [
self.view addSubview:callWebview];
    [callWebview 
release];
    [str 
release];

3,这种方法也会回去到原来的程序里(注意这里的telprompt),也会弹出提示
NSMutableString * str=[[NSMutableString allocinitWithFormat:@"telprompt://%@",@"186xxxx6979"];
    
//            NSLog(@"str======%@",str);
    [[UIApplication sharedApplicationopenURL:[NSURL URLWithString:str]]
阅读(638) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~