How would I dial a number and then key in numbers to the dialpad five seconds after?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 09:00:10

问题


I am creating an 0800 diverting app which allows the user to use his/her monthly credit to phone an 0800 number diversion service rather than pay extra by dialling in the 0800 number directly to the native phone app. Basically XCode will take the 0800 number from a label and will phone the conversion number (01212842800) then straight after, it will dial in to the keypad (on the same call), the 0800 number from the label.

If you know what I mean, how would I do this please?


回答1:


See this question on SO: Programmatically Dial a Phone number and pass DTMF using the iPhone SDK

It appears that you cannot dial a number programmatically, but you can achieve what you're trying to do by using ","s in the number that you call.

EX:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:01212842800,,,,,,,,,NUMBER_HERE"]];

With the commas acting as pauses.



来源:https://stackoverflow.com/questions/7058872/how-would-i-dial-a-number-and-then-key-in-numbers-to-the-dialpad-five-seconds-af

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!