我正在从我的应用程序打开waze,我想要一个按钮,当我点击时会将我带回我的应用程序,我已经为谷歌地图做了,就像我们必须做的那样:
NSString *urlString = @"comgooglemaps-x-callback://";
NSString *backButton =@"&x-success=MyApp://?resume=true&x-source=MyApp";
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:urlString]])
{
urlString = [NSString stringWithFormat:@"comgooglemaps-x-callback://?daddr=%@%@", [[NSString stringWithFormat:@"%@",
address] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],backButton];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
}
可以在waze中完成吗?
答案 0 :(得分:0)
试试这个
NSString *stringURL = @"waze://?ll=37.331689,-122.030731&z=10";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];