I am trying to make my application open the apple maps application and have the address be pulled up. I tried this :
- (IBAction)openInMaps:(id)sender {
NSS
Swift 2
let baseUrl : String = "http://maps.google.com/?q="
let name : String = tableCellData[indexPath.row]
let encodedName = "address of yours"
name.stringByAddingPercentEncodingWithAllowedCharacters(.URLQueryAllowedCharacterSet())
let finalUrl = baseUrl + encodedName!
let url = NSURL(string: finalUrl)!
UIApplication.sharedApplication().openURL(url)