Latest 1.0.1
License MIT
Platforms ios 7.0, requires ARC

EZHeartForLike in Objective-C.
EZHeartForLike show the animation between two different view. As you can see in the following Pics, the Heart is generated in the UIImageView, and finally move to the UIView under.
EZHeartForLike 是点赞动画的实现,但是值得注意的是动画的执行位置,从下图可以看出,大桃心和小桃心所在的View是不同的View。因此解决动画的跨View实现才是EZHeartForLike的真正目的。具体实现的方式请看我的博文

How To Get Started


You can install EZHeartForLike in a traditional way — drag the EZHeartForLike/EZHeartForLike/Module/View/EZHeartForLike and EZHeartForLike/EZHeartForLike/Module/Resources into your project. However, it is strongly recommended that you install via CocoaPods.

你可以直接在 EZHeartForLike/EZHeartForLike/Module/View/EZHeartForLike文件夹中将EZHeartForLike的.h、.m和EZHeartForLike/EZHeartForLike/Module/Resources两张桃心图加入到项目中直接使用

Install with CocoaPods

CocoaPods is a dependency manager for Objective-C and Swift, which automates and simplifies the process of using 3rd-party libraries like EZHeartForLike in your projects.

  • Podfile

    pod 'EZHeartForLike', '~> 1.0.1'


Create a EZHeartForLike

  1. Import the "EZHeartForLike.h" to your controller.

    #import "EZHeartForLike.h"
  2. Init the EZHeartForLike into your controller.

    EZHeartForLike *heart = [[EZHeartForLike alloc] initWithFrame:CGRectMake(0, 0, 24, 24) DisplayBigHeartOnView:self.tweetImageView];    

    If you want to do something after invoking the EZHeartForLike, set up the delegate.

    heart.delegate = self;


  3. If you want the EZHeartForLike to show your own image, just set the likeImage and the unlikeImage using follow function (nonessential):

    [heart setLikeImage:[UIImage imageNamed:@"liked"] unLikeImage:[UIImage imageNamed:@"unlike"]];
  4. add the EZHeartForLike to your view;

    [self.view addSubview:heart];
  5. enjoy. :)


  • -(void)tapLike;
    You can do something anter the like animation done.

    - (void)tapLike {    
  • -(void)tapUnlike;
    As "tapLike" function, you can do something after the unlike animation done;

    - (void)tapUnlike {    


1.0.1     修复快速点击会卡死的bug。

Issues, Bugs, Suggestions

Open an issue


EZHeartForLike is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "EZHeartForLike",
    "version": "1.0.1",
    "summary": "Show animation from one view to another view.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "EzfenCheung": "[email protected]"
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": "EZHeartForLike/EZHeartForLike/Module/View/EZHeartForLike/*.{h,m}",
    "resources": "EZHeartForLike/EZHeartForLike/Module/Resources/*.png",
    "requires_arc": true

Pin It on Pinterest

Share This