3

When selecting the disclosure button on a callout, the callout animates to the slide over and expand into larger area with more information.

Besides making this component from scratch, does anyone know how to make annotation callouts do this?

initial callout

expanded callout

Yogurt
  • 2,913
  • 2
  • 32
  • 63

2 Answers2

2

According to this: http://www.cocoacontrols.com/controls/gikanimatedcallout , Apple is using a private API. The link above has code that tries to replicate what Apple does.

meierjo
  • 106
  • 9
  • 1
    Unfortunately iOS6 wrecked the code but this seems like the best we can do, for now. Thanks. – Yogurt Oct 17 '12 at 19:01
0

you should use below delegate method

(void)mapView:(MKMapView *)mapview annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control

then in this delegate method, you should create an disclosure button. if(buttonType==disclosurebutton) then show custom UIView.

I think that will help overall.

casillas
  • 16,351
  • 19
  • 115
  • 215
  • Right, this is a method that would signal to us when either the left accessory or the right accessory is tapped. What I'm looking for is a way to animate the callout from the first picture to the callout in the second picture. Crack open maps and select the disclosure button on a callout and you'll see what I'm talking about. I could just slap on a popover after calloutAccessoryControlTapped is called but that's not what I'm looking for. Thanks though. – Yogurt Oct 02 '12 at 21:43