如何在iPhone中拨打电话? [英] How to make a call in iphone?
本文介绍了如何在iPhone中拨打电话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我单击tableview行时,我正在尝试拨打电话。
I am trying to make a call when I click on the tableview row.
但是它不起作用。
这是最简洁的代码。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ([indexPath row] == 0) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"1800-000-000"]];
}
}
我不知道为什么它不起作用。
I don't know why it is not working.
有人可以帮助我吗?
推荐答案
尝试此链接,我认为它将帮助您
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html
try this link I think it will help you https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html
这可以尝试以下操作:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:12125551212"]];
这篇关于如何在iPhone中拨打电话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文