ios - How can I change annotation title on Apple Maps Route -
i've created route b mkmapitem, can't change title of annotation on map. code:
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];
it opens fine... there's 1 problem: can't change annotation name:
mapitem.name = @"place name";
Comments
Post a Comment