iPhone: make a call

偶尔善良 提交于 2019-12-25 16:46:11

问题


Is there a way for my app to call a certain number and to play a certain sound?

Thanks.


回答1:


You can call a number by requesting the URL tel://###-###-###, but this will quit your application and launch the iPhone's default phone application. There is no way of playing a sound as your application has exited at that point.




回答2:


[[UIApplication sharedApplication]
  openURL:[NSURL URLWithString:@"tel://91-123******"]];


来源:https://stackoverflow.com/questions/1239328/iphone-make-a-call

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