我有一个应用程序,希望在用户按下按钮时使用谷歌地图或苹果地图打开。我该如何实现呢?是否有像链接一样可以打开地图的方式,还是需要其他方法?如果您能指导一下方向,那将非常有帮助。谢谢!我已经设置了以下按钮:
override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
for touch in (touches ) {
let location = touch.locationInNode(self)
let node = self.nodeAtPoint(location)
if node.name == "openMaps" {
//code to open google maps or apple maps....
}