如何以编程方式在 iPhone 上拨打电话?
How do I programmatically make phone calls on the iPhone?
试试这个:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8005551212"]];
...这将弹出一个对话框,您的用户将在其中确认呼叫。
Try this:
... which will bring up a dialog in which your users will confirm the call.
我知道这是一篇旧文章,但我会给出不同的答案。
esqew 方法效果很好,但它会直接进入电话应用程序,并且不会提示您使用通话按钮确认号码。
尝试这种方法,它会给出一个提示选项。
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://1028464023"]];
唯一改变的是:URLWithString 上的电话提示。尝试一下。
I know this is an old post, but I'll give a different answer.
esqew approach works well but it goes straight to the phone app and it doesn't give you a prompt to confirm the number with a call button.
Try this approach and it gives a prompt option.
The only thing that changes is: telprompt on URLWithString. Give it a try.
既然您不想按照 seanny94 建议的方式进行操作,那么唯一的其他方法就是 VoIP。检查此问题或询问 Skype 如何操作。
Since you don't want to do it the way seanny94 suggests, the only other way is VoIP. Check this question or ask Skype how to do it.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(3)
试试这个:
...这将弹出一个对话框,您的用户将在其中确认呼叫。
Try this:
... which will bring up a dialog in which your users will confirm the call.
我知道这是一篇旧文章,但我会给出不同的答案。
esqew 方法效果很好,但它会直接进入电话应用程序,并且不会提示您使用通话按钮确认号码。
尝试这种方法,它会给出一个提示选项。
唯一改变的是:URLWithString 上的电话提示。尝试一下。
I know this is an old post, but I'll give a different answer.
esqew approach works well but it goes straight to the phone app and it doesn't give you a prompt to confirm the number with a call button.
Try this approach and it gives a prompt option.
The only thing that changes is: telprompt on URLWithString. Give it a try.
既然您不想按照 seanny94 建议的方式进行操作,那么唯一的其他方法就是 VoIP。检查此问题或询问 Skype 如何操作。
Since you don't want to do it the way seanny94 suggests, the only other way is VoIP. Check this question or ask Skype how to do it.