Thanks to visit codestin.com
Credit goes to github.com

Skip to content

erdinc/HZRButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HZRButton

Version License Platform

Demo

HZRButton demo

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Add HZRButtonDelegate to get callback when animation finished,

- (void)animatingButtonDidFinishLoading:(HZRButton *)button

Create button, customize as you want.

HZRButton *button = [[HZRButton alloc]init];
....
....
[button addTarget:self action:@selector(save:) forControlEvents:UIControlEventTouchUpInside];

- (void)save:(HZRButton *)sender{
    [file saveInBackgroundWithBlock:^(BOOL succeed, NSError *error) {
        NSLog(@"upload succeeded");
    } progressBlock:^(int percentDone) {
        [sender updatePercentage:percentDone]; // keep updating the percentage.
    }];
}

// this is called when the loading animation finished. 
- (void)animatingButtonDidFinishLoading:(HZRButton *)button{
    NSLog(@"loading finished %@", button);
}

Installation

HZRButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "HZRButton"

Author

Erdinc Akkaya, [email protected]

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published