2015-02-16 12 views

risposta

23

Se hai un MKPlaceMark è possibile utilizzare un MKMapItem e aprire la mappa-app con la posizione come launchOption:

var mapItem = MKMapItem(placemark: yourPlaceMark) 

mapItem.name = "The way I want to go" 

//You could also choose: MKLaunchOptionsDirectionsModeWalking 
var launchOptions = [MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeDriving] 

mapItem.openInMapsWithLaunchOptions(launchOptions) 

Swift 3

mapItem.openInMaps(launchOptions: launchOptions) 
+0

grazie! questo ha funzionato – Vincent

+0

scusa, sono nuovo di questo ... :) – Vincent

Problemi correlati