Latest 0.0.2
Homepage https://github.com/jwfstars/WFFavoriteButton
License MIT
Platforms ios 6.0, requires ARC
Dependencies pop
Frameworks Foundation, UIKit
Authors

A nice favorite button with pop

screen_record~

Usage

WFFavoriteButton *buttonTrack = [[WFFavoriteButton alloc] initWithStyle:WFFavoriteButtonStyleTrack];
buttonTrack.frame = CGRectMake(100, 200, 60, 60);
[buttonTrack setImage:[UIImage imageNamed:@"heart"] forState:UIControlStateNormal];
[buttonTrack setTitle:@"track" forState:UIControlStateNormal];
[self.view addSubview:buttonTrack];

WFFavoriteButton *buttonShake = [[WFFavoriteButton alloc] initWithStyle:WFFavoriteButtonStyleShake];
buttonShake.frame = CGRectMake(100, 300, 60, 60);
[buttonShake setImage:[UIImage imageNamed:@"heart_gray"] forState:UIControlStateNormal];
[buttonShake setImage:[UIImage imageNamed:@"heart"] forState:UIControlStateSelected];
[buttonShake setTitle:@"shake" forState:UIControlStateNormal];
[buttonShake addTarget:self action:@selector(onTapShakeButton:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:buttonShake];

CocoaPods

  1. Update cocoapods to the latest version.
  2. Add pod 'WFFavoriteButton' to your Podfile.
  3. Run pod install or pod update.
  4. Import <WFFavoriteButton/WFFavoriteButton.h>.

Latest podspec

{
    "name": "WFFavoriteButton",
    "summary": "A nice favorite button with pop",
    "version": "0.0.2",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jiang Wenfan": "[email protected]"
    },
    "homepage": "https://github.com/jwfstars/WFFavoriteButton",
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/jwfstars/WFFavoriteButton.git",
        "tag": "0.0.2"
    },
    "source_files": "WFFavoriteButton/*.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "dependencies": {
        "pop": []
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This