I am using a MKMapView with custom placeMark, it has a NSString value and i’ll like to add it as label to the mkannotationview image.
- (MKAnnotationView *)mapView:(MKMapView *)MapView viewForAnnotation:(MyPlaceMark *)annotation{
static NSString* AnnotationIdentifier = @"AnnotationIdentifier";
MKAnnotationView* MyView = [[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier] autorelease];
MyView.canShowCallout=YES;
MyView.image = [UIImage imageNamed:@"MyImage.png"];
return MyView;}
Which would be the best way to get it, I tried to add a label to the image but I had problems with the CGRect and I get nothing, any idea how to make it
Thanks!
The annotation view draws the image? In that case I would add a UILabel as a subview.