I have an MKPinAnnotationView
which I have customized in the -(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
method. In the method I have done the following:
MKPinAnnotationView *newAnn = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"pinAnn"];
newAnn.leftCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeInfoLight];
But this results in the info button being pushed into the top left corner of the call out. I then tried:
MKPinAnnotationView *newAnn = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"pinAnn"];
UIButton *left = [UIButton buttonWithType:UIButtonTypeInfoLight];
left.center = CGPointMake(left.center.x + 5, left.center.y - 5);
newAnn.leftCalloutAccessoryView = left;
But it does nothing. I'm on iOS 8 btw. I'm not sure if this happens on iOS 7.