是否可以更改地址字段的文本(映射的标题),并为MKMapItem保留不同的管脚文本和地址字段文本?
我看到iOS原生联系人应用程序能够打开地图,地址字段是联系人的地址,引脚文本是联系人的姓名。
但是当我通过调用以下命令打开iOS原生地图时
[MKMapItem openMapsWithItems/openInmapsWithLaunchOptions]地址字段中的文本和引脚中的文本始终相同。为什么?
发布于 2015-06-16 14:58:42
[MKMapItem openMapsWithItems:mapItems launchOptions:nil];需要一个数组和参数:
//So you have to define:
NSMutableArray* mapItems = [[[NSMutableArray alloc] init] autorelease];
//and now fill the array with MKMapItems
MKMapItem *mapItem = [[[MKMapItem alloc] initWithPlacemark:placemark] autorelease]; //placemark contains longitude and latitude values
[mapItem setName:@"This is my name"];
[mapItems addObject:mapItem];
//Now you can make the call:
[MKMapItem ope nMapsWithItems:mapItems launchOptions:nil];https://stackoverflow.com/questions/25195316
复制相似问题