解决方法
这是我如何为你的参考,但对于苹果,我还没有找到一种方法来启动通过网址方案导航.
+ (void)navigateToLocation:(CLLocation*)_navLocation { if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgooglemaps://"]]) { NSString *string = [NSString stringWithFormat:@"comgooglemaps://?daddr=%f,%f&directionsmode=driving",_navLocation.coordinate.latitude,_navLocation.coordinate.longitude]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]]; } else { NSString *string = [NSString stringWithFormat:@"http://maps.apple.com/?ll=%f,%f",_navLocation.coordinate.longitude]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]]; } }