iOS 拨打电话相关知识总结
来源:互联网 发布:批处理图片的软件 编辑:程序博客网 时间:2024/05/17 22:40
示例方法
1.貌似是私有方法,拨打电话完成后可返回应用,拨打前有提示。
NSString *strTel= [NSStringstringWithFormat:@"telprompt:13888888888"];
2.用网页加载来拨打电话,效果和第一种一样,使用没有任何问题
NSURL * url = [NSURL URLWithString:@"tel:11111111"];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
3.普通方法,直接拨打,打完回不到应用,回到系统拨号界面
NSString *strTel= [NSStringstringWithFormat:@"tel:13888888888"];[[UIApplication sharedApplication] openURL:[NSURLURLWithString:strTel]];
相关问题:
1.特殊号码拨打失败
[[UIApplication sharedApplication] openURL:[NSURLURLWithString:@"tel://*111*12371#]];
相关库 CoreTelephony
这个里面有一个Demo(CoreTelephonyDemo:file:///Users/shjborage/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_0.iOSLibrary.docset/Contents/Resources/Documents/index.html#samplecode/CoreTelephonyDemo/Introduction/Intro.html)
所有相关链接:file:///Users/shjborage/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_0.iOSLibrary.docset/Contents/Resources/Documents/index.html#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
Organization of This Document
Each article in this document describes the format of aparticular type of URL:
“Mail Links” describes the format for sending email with theMail application.(mailto:frank@wwdcdemo.example.com)
“Phone Links” describes the format for dialing phone numbers in thePhone application.(tel:1-408-555-5555)
“Text Links” describes the format for launching the Textapplication.(
sms:
sms:1-408-555-1212
)
“Map Links” describes the format for specifying locations in theMaps application.(http://maps.google.com/maps?daddr=San+Francisco,+CA&saddr=cupertino
“YouTube Links” describes the format for linking to YouTubevideos.(http://www.youtube.com/v/VIDEO_IDENTIFIER)
“iTunes Links” describes the format for linking to items in theiTunes Music Store.(http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=156093464&id=156093462&s=143441)
转一下别人写的:
在iPhone中,可以直接用UIApp打开URL地址。如下所示:
[ UIApp openURL: [ NSURL URLWithString:@"http://www.apple.com"] ];
或者:
[ UIApp openURL: [ NSURLURLWithString:@"mailto:apple@mac.com?Subject=hello" ] ];
与此同时,iPhone还包含一些其他除了http://或者mailto:之外的URL:
sms:// 可以调用短信程序
tel:// 可以拨打电话
itms:// 可以打开MobileStore.app
audio-player-event:// 可以打开iPod
audio-player-event://?uicmd=show-purchased-playlist可以打开iPod播放列表
video-player-event:// 可以打开iPod中的视频
个人项目中使用实例:(使用了SQLibs,请查看相关博文)
- iOS 拨打电话相关知识总结
- iOS开发- 拨打电话总结
- iOS开发- 拨打电话总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话的方法总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- iOS 拨打电话三种方式总结
- ios 拨打电话
- IOS开发 拨打电话
- "/usr/include/sqlite3.h" …
- git笔记--基础
- ShareKit 中SHK.m中的编译错…
- Object_c底层细节
- TortoiseSVN切换登录用户
- iOS 拨打电话相关知识总结
- 进程名字的赋值
- iOS 播放流媒体 服务端配置备份
- 一行代码,在 iPhone 应用中…
- 用UIWebView,JS获取视频链接
- iPhone app 内嵌httpserver
- android 混淆
- iOS 剪贴板使用相关总结《转》
- 让用户在应用中进入 App&nbsp…