0
我想通過WhatsApp URL方案傳遞Google Maps URL作爲文本。通過WhatsApp URL方案作爲文本傳遞URL
我想編碼它,但我不認爲我做得對。
let message = "View my current location at http://maps.google.com/?q=\(location.coordinate.latitude),\(location.coordinate.longitude)"
var completewhatsappURLString = whatsappURL + message
completewhatsappURLString = completewhatsappURLString.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)!
let completeURL = NSURL(string: completewhatsappURLString)