在swift 2中是否可以隐藏NSURL tel函数中的数字?


    @IBAction func callingButtonTapped(sender: AnyObject) {
    let busPhone = String("0888888")
    let namePhone = String("NAME")
    if let url = NSURL(string: "tel://(busPhone)") {
        UIApplication.sharedApplication().openURL(url)
    }

嗨,我是用Swift开发应用程序的新手。当我从应用程序调用这个088888号码时,号码不显示并显示"NAME",是否有可能?

这是不可能的。URL-Scheme只打开拨打该号码的手机应用程序。

无论iOS上的编程语言如何,这都是不可能的。

不,不可能。这些是tel URL方案的功能:https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html它与Swift vs Objective-C没有任何关系。

总是不可能从URL隐藏数字。我们不能隐藏和显示'Name'而不是URL No。我们可以使用tel:088888默认使用open URL调用no。在iOS中,这是不可能的。

最新更新