【发布时间】:2010-01-06 18:07:15
【问题描述】:
要打开带有方向的 Google 地图,我在 NSURL 中使用了格式化的 NSString。但它不适用于 [[UIApplication sharedApplication] openURL:nsurl];
代码:
NSString * directionsURL = [NSString stringWithFormat:@"http://maps.google.com/maps?daddr=%@&saddr=%@", @"Hartenseweg 16, Renkum", @"1 Infinte Loop, Cupertino"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:directionsURL]];
【问题讨论】:
标签: iphone nsurl openurl stringwithformat