Created
July 13, 2015 17:34
-
-
Save ziyang0621/3fd49e78fd7287977441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)test { | |
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: @"comgooglemaps-x-callback://"]]) { | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: [NSString stringWithFormat:@"comgooglemaps-x-callback://?saddr=%@,%@&daddr=%@,%@&", @"18.9750", @"72.8258", @"23.0300",@"72.5800"]]]; | |
} else { | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%@,%@&daddr=%@,%@", @"18.9750", @"72.8258", @"23.0300",@"72.5800"]]]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment