English 中文(简体)
Animating custom callout for MKAnnotationView in MKMapView with "pop in" effect
原标题:

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!

最佳回答

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];
问题回答

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.





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签