Armin
Armin

Reputation: 1150

MKAnnotationView shows callout before dragging pin

I have a set of MKPinAnnotationViews that are draggable and can show callouts. When I want to drag a pin by longpressing the pin, its callout opens and disables my touch so I have longpress AGAIN to start dragging. I don't want this behaviour and prefer dragging the pin on first touch. Is there a way to control this behaviour? Or is there a way to show callouts on Touch Up Inside instead of Touch Down?

Upvotes: 1

Views: 392

Answers (1)

Armin
Armin

Reputation: 1150

Found the answer myself:

-(void)mapView:(MKMapView *)mapView didDeselectAnnotationView:(MKAnnotationView *)view
{
    [view setSelected:YES];
}

Upvotes: 5

Related Questions