let location = CLLocationCoordinate2D(latitude: 32.075300, longitude: 34.782563)
@IBAction func DirectionsTolocationButton(_ sender: Any) {
// Create the AlertController and add its actions like button in ActionSheet
let ActionSheet = UIAlertController(title: "Please Select A Navigation Service.", message: nil, preferredStyle: .actionSheet)
let AppleMapsButton = UIAlertAction(title: "Apple Maps", style: .default) { action -> Void in
let destinationName = (self.barNameTemplate )
self.openMapsAppWithDirections(to: self.CoordinatesTemplate, destinationName: destinationName)
print("Apple Map Chosen!")
}
let WazeButton = UIAlertAction(title: "Waze", style: .default) { action -> Void in
func openWaze(location : CLLocationCoordinate2D) …
Run Code Online (Sandbox Code Playgroud)