souzainf3 / RNLoadingButton

An easy-to-use UIButton subclass that implements a loading with aligment options

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RNLoadingButton

Used in Zee - Personal Finances.

https://itunes.apple.com/us/app/id422694086

An easy-to-use UIButton subclass with an activity indicator.

The activity state is configurable and can hide the image or text while the activity indicator is displaying . You can Also choose the position of easily activity indicator or Set It up with a spacing.

Requirements

iOS 5

Installation

Cocoapods

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

pod 'RNLoadingButton', '~> 0.0.1'

Source

To run the example project; clone the repo, and open the demo project

Usage

#import "RNLoadingButton.h"

    btnLeftLoading.hideTextWhenLoading = NO;
    btnLeftLoading.loading = YES;
    [btnLeftLoading setActivityIndicatorAlignment:(RNLoadingButtonAlignmentLeft)];
    [btnLeftLoading setActivityIndicatorStyle:(UIActivityIndicatorViewStyleGray) forState:(UIControlStateDisabled)];
//    btnFacebook.activityIndicatorEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 10);

Author

Romilson Nunes, souzainf3@yahoo.com.br

License

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

About

An easy-to-use UIButton subclass that implements a loading with aligment options

License:MIT License


Languages

Language:Objective-C 91.6%Language:Ruby 8.4%