CatZanButton, An animation button for "赞/Zan"

分享于 

2分钟阅读

GitHub

  繁體
A animation button for "赞/Zan"
  • 源代码名称:CatZanButton
  • 源代码网址:http://www.github.com/ImKcat/CatZanButton
  • CatZanButton源代码文档
  • CatZanButton源代码下载
  • Git URL:
    git://www.github.com/ImKcat/CatZanButton.git
    Git Clone代码到本地:
    git clone http://www.github.com/ImKcat/CatZanButton
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/ImKcat/CatZanButton
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
    CatZanButton

    Build StatusVersionPlatformLicense

    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
    
    
      }
    
    
    }];
    
    
    
    

    相关文章