拨打电话
来源:互联网 发布:淘宝助手有什么用处 编辑:程序博客网 时间:2024/04/30 11:09
// 拨打电话方法1 直接拨打电话,打完电话后留在通讯录(ios8好像是回到app)
NSMutableString * str=[[[NSMutableString alloc] initWithFormat:@"tel:%@",phoneNumber] autorelease];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
// 拨打电话方法2 再弹一次提示,打完电话后可以返回程序
UIWebView *callWebView = [[UIWebView alloc] init];
NSURL *telURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",phoneNumber]];
[callWebView loadRequest:[NSURLRequest requestWithURL:telURL]];
[self.view addSubview:callWebView];
[callWebView release];
// 拨打电话方法3 会回去到原来的程序⾥里(注意这⾥里的telprompt),也会弹出提⽰,(审核通不过)
NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"186xxxx6979"
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]]
// 如果电话号码是多个
UIAlertView * alert = [[UIAlertViewalloc] initWithTitle:@"电话下单"
message:nil
delegate:self
cancelButtonTitle:@"取消"
otherButtonTitles:nil];
for (int i =0; i < _phones.count; i++){
[alert addButtonWithTitle:[_phonesobjectAtIndex:i]];
}
alert.tag =111;
[alertshow];
[alertrelease];
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- 拨打电话
- j2me拨打电话
- j2me拨打电话
- 拨打电话的礼仪
- Window Mobile拨打电话
- 简单拨打电话程序!!!
- 6、Libgdx文件处理
- 非常有意思的人体时钟
- 常见的C语言内存错误及对策
- 笔记:linux-sed[马哥linux]
- Insert Interval
- 拨打电话
- poj1753--Flip Game(高斯消元问题2,枚举自由元的首杀)
- solr定时实时重建索引和增量更新
- android中的animation动画左右摇摆晃动
- Ubuntu14.04 64 位系统 安装 Cuda 6.5
- IOS 动画之加载图片
- 深入设计模式-4.建造者模式
- xCode6制作动态及静态Framework
- 笔记:shell编程 变量 分支 关系运算[马哥linux ]