0

I'm able to set the MKPinAnnotationView with title, subtitle, an image on the left (leftCalloutAccessoryView) and a button on the right (rightCalloutAccessoryView).

With this code i set the image on the left:


UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Icon.png"]];
myImageView.frame = CGRectMake(0, 0, 10, 10);
customPinView.leftCalloutAccessoryView = myImageView;
[myImageView release], myImageView = nil;


The result is something like this:
Image 1

but I would like to get something like this:
Image 2 where the image is aligned with the subtitle.

How can get it?

Thx.

Daniele
  • 122
  • 1
  • 1
  • 10

1 Answers1

1

That's going to require using a custom annotationView. There's plenty of documentation about this in the developer resources. There's no way to do that image alignment using the default annotation style.

Nick
  • 8,483
  • 10
  • 46
  • 65