简体   繁体   English

打开用于呼叫号码用户想要的拨号盘

[英]opening dial pad for calling number user want

i want to open dial pad when user click on call button and then user enter phone number and call it 我想在用户点击通话按钮时打开拨号盘,然后用户输入电话号码并拨打电话

i know we can make call like this 我知道我们可以这样打电话

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://2135554321"]];

but i want to open dial pad and then let user enter number and press call button to call 但我想打开拨号盘,然后让用户输入号码,然后按通话键拨打电话

if this is not possible then want to do something like my app open direct to dail pad then user call it and then it should redirect to my app 如果这是不可能的,那么想做我的应用程序打开直接到dail pad然后用户调用它,然后它应该重定向到我的应用程序

No you cant do this in iOS . 不,你不能在iOS中这样做。 iPhone SDK not gives you direct access to dial a numbers from the application .The one way to achieve this is take a text field iPhone SDK不允许您直接访问从应用程序拨打号码。实现此目的的一种方法是采用文本字段

textfield.keyboardType = UIKeyboardTypePhonePad;

and

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",textfield.text]]];

You have to see the format for entering the number. 您必须查看输入号码的格式。

Why not create a UIView that has a " UITextField " and when the text field comes up, have the keyboard set to only be numbers (ie pretty much the same thing as the dialpad). 为什么不创建一个具有“ UITextField ”的UIView,当文本字段出现时,将键盘设置为仅为数字(即与拨号盘几乎相同)。

And once they are done entering in the number, then you can call the " openURL " line you have above. 一旦他们完成输入的号码, 然后你可以调用“ openURL你有上述的”行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法取消电话号码中的拨号盘 - Unable to cancel a dial pad in phone number 当用户在我的应用程序中按联系人号码时,如何获取电话号码并在电话拨号盘中显示该号码 - How to get the phone number and show that number in phone dial pad when user press contact number inside my app 当我的自定义表格视图单元格中的用户选项卡调用按钮时,如何从json获取数字并在拨号盘中显示该数字 - how to get number from json and show that number in dial pad when user tab call button in my custom table view cell 向iPhone拨号盘显示一个号码,但不能实际拨打电话 - Present iPhone dial pad with a number but not actually place the call inputType = {“number”},数字拨号盘未显示在 ios 但在 android 中可见 - React js - inputType={"number"}, Number dial pad not showing in ios but visible in android - React js 如何跳转到iOS中的拨号盘 - How to jump to dial pad in iOS iOS-是否可以通过编程方式检测有人何时在其拨号盘上按数字? - Ios- is there a way to programmatically detect when someone presses a number on their dial pad? 自定义拨号盘DTMF音调太大 - Custom dial pad DTMF tones are too loud 拨打 USSD 号码或打开电话应用 - Calling a USSD number or opening Phone app 在智能手机应用上拨打电话 - Dial a number on smartphone app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM