jos*_*uth 4 iphone objective-c dialing ios
我们公司最近开始从黑莓转向iPhone,最大的抱怨(例如它)是你无法启动拨号序列(拨打号码,等待接听,拨打更多号码,等待回复,拨打更多号码)等...可用于进入电话会议,如InterCall.
我可以在iPhone上编写一个简单的应用程序吗?我最关心的部分是访问电话拨号机制.其余的我可以通过联系人等工作......
如果这样的话可能吗?如果是这样,我应该研究哪种类和方法?
所以,我只是试过这个
- (void)call {
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"tel://611,1,1"]];
}
- (void)viewDidLoad
{
[super viewDidLoad];
UIButton *telButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
telButton.frame = CGRectMake(20, 20, 100, 100);
[telButton setTitle:@"Call" forState:UIControlStateNormal];
[telButton addTarget:self action:@selector(call) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:telButton];
}
Run Code Online (Sandbox Code Playgroud)
它起作用了.
自动拨打下一个号码是通过放置逗号,并提示用户允许电话拨打下一个号码来实现的,方法是放置一个分号;.
参考文献1:http://www.modernsaver.com/pause-wait-blackberry-iphone-droid 参考文献2:http://www.iphonedevsdk.com/forum/iphone-sdk-development/85581-make-phone-call -tableView-cell.html#post355401
| 归档时间: |
|
| 查看次数: |
386 次 |
| 最近记录: |