[英]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)
}
嗨,我是使用Swift開發應用程序的新手。 當我從應用程序中呼叫此088888數字時,是否可以顯示數字而不顯示“ NAME”?
不行,這是不可能的。 URL方案僅打開撥打該號碼的電話應用程序。
無論iOS上的編程語言如何,這都是不可能的。
不,不可能。 這些是電話URL方案的功能: https : //developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html與Swift和Objective-C無關。
總是不可能從URL中隱藏數字。我們無法隱藏和顯示“名稱”而不是URL號。我們可以使用開放URL使用tel:088888默認調用no。 在iOS中,無法執行此操作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.