iOS拨打电话(三种方法)
2014-09-23 15:06
204 查看
1、NSMutableString * str=[[NSMutableString
alloc] initWithFormat:@"tel:%@",@"186xxxx6979"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
2,这种方法,打完电话后还会回到原来的程序,也会弹出提示,推荐这种
NSMutableString *
str=[[NSMutableString
alloc] initWithFormat:@"tel:%@",@"186xxxx6979"];
UIWebView * callWebview = [[UIWebView
alloc] init];
[callWebview loadRequest:[NSURLRequest
requestWithURL:[NSURL
URLWithString:str]]];
[self.view
addSubview:callWebview];
[callWebview release];
[str release];
3,这种方法也会回去到原来的程序里(注意这里的telprompt),也会弹出提示
NSMutableString *
str=[[NSMutableString
alloc] initWithFormat:@"telprompt://%@",@"186xxxx6979"];
[[UIApplication
sharedApplication] openURL:[NSURL
URLWithString:str]]
alloc] initWithFormat:@"tel:%@",@"186xxxx6979"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
2,这种方法,打完电话后还会回到原来的程序,也会弹出提示,推荐这种
NSMutableString *
str=[[NSMutableString
alloc] initWithFormat:@"tel:%@",@"186xxxx6979"];
UIWebView * callWebview = [[UIWebView
alloc] init];
[callWebview loadRequest:[NSURLRequest
requestWithURL:[NSURL
URLWithString:str]]];
[self.view
addSubview:callWebview];
[callWebview release];
[str release];
3,这种方法也会回去到原来的程序里(注意这里的telprompt),也会弹出提示
NSMutableString *
str=[[NSMutableString
alloc] initWithFormat:@"telprompt://%@",@"186xxxx6979"];
[[UIApplication
sharedApplication] openURL:[NSURL
URLWithString:str]]
相关文章推荐
- iOS拨打电话(三种方法)
- iOS拨打电话(三种方法)
- iOS拨打电话的三种方法
- iOS 拨打电话的三种方法
- iOS拨打电话的三种方法
- iOS拨打电话(三种方法)
- iOS拨打电话(三种方法)
- ios 拨打电话 三种方法
- iOS 拨打电话三种方式 和 发短信的两种方法
- iOS拨打电话(三种方法)
- ios中拨打电话的三种方法
- iOS三种拨打电话的方法
- iOS开发技巧之:iOS拨打电话(三种方法)
- IOS拨打电话方法
- iOS 拨打电话三种方式总结
- iOS 拨打电话的三种方式总结
- iOS拨打电话并且能返回当前应用的方法
- iOS 拨打电话的三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结