liwang0113 / CatZanButton

A animation button for "赞/Zan"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CatZanButton

Build Status Version Platform License

Introduction

CatZanButton is easy to create a zan button with cool animation

ScreenRecords

ScreenShots1

Installation

CatZanButton is available on CocoaPods.Just add the following to your project Podfile:

pod 'CatZanButton'

#Usage

#import "CatZanButton"

CatZanButton *zanBtn=[[CatZanButton alloc] initWithFrame:CGRectMake(0, 0, 50, 50) zanImage:[UIImage imageNamed:@"Zan"] unZanImage:[UIImage imageNamed:@"UnZan"]];
[zanBtn setCenter:self.view.center];
[self.view addSubview:zanBtn];

[zanBtn setClickHandler:^(CatZanButton *zanButton) {
  if (zanButton.isZan) {
    //Do something
  }else{
    //Do something
  }
}];

About

A animation button for "赞/Zan"

License:MIT License


Languages

Language:Objective-C 95.3%Language:Ruby 4.7%