我想在本机应用程序的 GoogleMaps 和 Waze 中打开方向驾驶模式。怎么做?
func showActionSheet(vc: UIViewController) {
let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
actionSheet.addAction(UIAlertAction(title: "Google Maps", style: .default, handler: { (alert:UIAlertAction!) -> Void in
self.openGoogleMaps()
}))
actionSheet.addAction(UIAlertAction(title: "Waze", style: .default, handler: { (alert:UIAlertAction!) -> Void in
self.openWaze()
}))
actionSheet.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
vc.present(actionSheet, animated: true, completion: nil)
}
目前我已经实现了 2 个功能,但我想知道如何在本地应用程序中为这两个地图打开
func openGoogleMaps() {
//Don't want open in URL, want to open in native googlemaps app
}
func openWaze() {
//Don't want open in URL, want to open in native Waze app
}