views:

861

answers:

2

I finally managed to put together a custom callout UIView that gets shown when a MKAnnotationView is tapped. I did this by overriding

- (void)setSelected:(BOOL)selected animated:(BOOL)animated;

in my custom MKAnnotationView subclass. Note: I prevented the main callout from showing by setting the canShowCallout property to NO.

I'd like to try and replicate the animation that the standard callout uses... It seems to bubble up -- going a little bigger than intended, and then back to it's normal size. So far, I seem to be at a loss trying to figure out how to produce a similar animation with core animation. Anyone have any suggestions or pointers?

Thanks in advance!

+1  A: 

I found a decent solution for this one. The ftutils library provides a pop in animation. It's really easy to call too:

#import "FTAnimation.h"

[self.viewToAnimate popIn:.4 delegate:nil];
Aaron
+1  A: 

I have developed a custom callout bubble that is nearly identical to the system callout bubble, but gives more flexibility over the height and content. See my post on the Asynchrony Solutions blog for example code. It also details the steps to animate the callout using Core Animation so that it appears to pop out of the map pin. It involves an affine transform that scales and translates the view.

JARinteractive