简体   繁体   中英

is it possible to hide number from NSURL tel function in swift 2?

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

Hi I'm new at developing apps with Swift. Is it possible when i call this 088888 number from app, number not show up and show 'NAME' instead?

No this is not possible. The URL-Scheme merely opens the phone app which dials the number.

This is not possible regardless of the programming language on iOS.

No, it is not possible. These are the capabilities of the tel URL scheme: https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html And it has nothing to do with Swift vs Objective-C.

Always it is not possible to hide the number from URL.We can't hide and show the 'Name' instead of URL No.We can call the no using tel:088888 default using open URL. In iOS it is not possible to do this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM