Ios 如何更改Apple Maps路线上的注释标题
我已使用MKMapItem创建了从a到B的路由,但无法更改地图上批注的标题。我的代码:Ios 如何更改Apple Maps路线上的注释标题,ios,xcode,cocoa-touch,maps,apple-maps,Ios,Xcode,Cocoa Touch,Maps,Apple Maps,我已使用MKMapItem创建了从a到B的路由,但无法更改地图上批注的标题。我的代码: CLLocation *locationRestaurante = [[CLLocation alloc] initWithLatitude:[[[listaRestaurante objectAtIndex:0] objectForKey:@"latitude"] floatValue] longitude:[[[listaRestaurante objectAtIndex:0] objectForKey:
CLLocation *locationRestaurante = [[CLLocation alloc] initWithLatitude:[[[listaRestaurante objectAtIndex:0] objectForKey:@"latitude"] floatValue] longitude:[[[listaRestaurante objectAtIndex:0] objectForKey:@"longitude"] floatValue]];
MKPlacemark *place = [[MKPlacemark alloc] initWithCoordinate:locationRestaurante.coordinate addressDictionary:nil];
MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:place];
NSDictionary *options = @{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving};
[mapItem openInMapsWithLaunchOptions:options];
它打开一切都很好。。。但只有一个问题:我无法更改此注释名称:
mapItem.name = @"Place name";