单击按钮在ios中打开拨号程序 [英] open dialer in ios on click of button

查看:71
本文介绍了单击按钮在ios中打开拨号程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了以下代码,但没有用

I tried following code but it is not working

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

请提供支持iOS7 SDK的帮助.

Please provide help which support iOS7 SDK.

推荐答案

在代码中的tel:之后删除//

Remove // after tel: in your code

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:55698"]];

OR

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",@"55698"]]];

这篇关于单击按钮在ios中打开拨号程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆