我正在尝试从我的应用程序中启动地图,并且我正在使用以下内容:
- (void) showMap:(id) button {
UIApplication *application = [UIApplication sharedApplication];
NSString *address = [((PhoneButton *) button).cell.client fullAddress];
NSString *addressUrl = [NSString stringWithFormat: @"http://maps.apple.com/?q=%@", address];
NSLog(@"Maps String: %@", addressUrl);
NSURL *map_url = [NSURL URLWithString:addressUrl];
[application openURL:map_url];
};
好吧,它不工作。我试图找到问题,但看起来我做得对。那么,我错过了什么?
PS:我的地址格式是“800, Madison Ave, New York, NY”