iphone - 调用文本字段中提到的号码

标签 iphone ios

我正在做生日剩余申请。我提供了一个文本字段来输入手机/电话号码。底部我提供了一个按钮,如果我们按下该按钮,调用需要继续到文本字段中给出的号码。我尝试过,但我无法做到这一点。任何人都可以帮助我编码。谢谢!

最佳答案

试试这个

    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@",self._phoneNumber]];
    [[UIApplication sharedApplication] openURL:url];    

仅适用于 iPhone,必须实现您自己的警报委托(delegate)方法。

关于iphone - 调用文本字段中提到的号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9563324/

相关文章:

ios - Swift - 闭包中不包含匿名闭包参数

iphone开发: changing the button image on tableviewcell

ios - 如何更改以编程方式为 UIButton 添加的约束

ios - 从 chartboost 删除应用程序?

iphone - 通过在 iOS Xcode 中打印 "(lldb)"调用 iphone 中的实例方法设置值导致崩溃

ios - 使用 Alamofire 和 EVReflection 的 JSON POST 请求

iphone - ARC 转换的应用程序问题 : passing adress of non local object to _autoreleaseing parameter for write-back

iphone - 如何在调用电话后恢复背景音乐(iOS)?

ios - 如何在我的应用程序中实现 URL Schema?

objective-c - 调整 UIButton 上的图像