Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 1.87 KB

README.md

File metadata and controls

76 lines (53 loc) · 1.87 KB

SpinnerButton

Build Status Version License Platform

Example

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

Installation

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

pod 'SpinnerButton'

Requirements

  • iOS 9.0+

Usage example

Start loading animation:

  [self.button startAnimating];

Stop loading animation:

  [self.button stopAnimating];

Stroke line width of the animated border (default: 5):

  self.button.strokeLineWidth = 2;

Define a corner radius (default: 5):

  self.button.cornerRadius = 5;

Define a color of the animated stroke:

  [self.button setStrokeColor:UIColor.redColor];

Define mulitple colors to make gradient in the animated stroke:

  NSArray *colors = [[NSArray alloc] initWithObjects:UIColor.blueColor, UIColor.redColor, UIColor.orangeColor, nil];
  [self.button setStrokeColors:colors];

Time interval of animation duration:

  self.button.timeInterval = 0.5;

Author

Max Kalik, [email protected]

License

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