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)