5 Commits

Author SHA1 Message Date
Mike Maxwell b38ff7f706 Release 0.2.0. 2015-01-08 23:58:46 -08:00
Mike Maxwell 73e9f07d00 #1 - add convenience method for starting/stopping animation via BOOL variable 2015-01-08 23:55:23 -08:00
Mike Maxwell 761621d049 #2 - add comments to public header file 2015-01-08 23:54:59 -08:00
misterwell b479603ff2 Updated link to demo image 2014-12-28 18:49:00 -08:00
Mike Maxwell 74a409692f Including demo image in ready 2014-12-28 18:45:46 -08:00
5 changed files with 33 additions and 1 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

+1 -1
View File
@@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = "MMMaterialDesignSpinner"
s.version = "0.1.0"
s.version = "0.2.0"
s.summary = "An iOS activity spinner modeled after Google's Material Design spinner"
s.description = <<-DESC
I love Google's new indeterminate spinner in the [Material Design guidelines](http://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators), and I hadn't found a recreation of it for iOS yet, so I created it using CoreGraphics and CoreAnimation, which makes it super lightweight, smooth, and scalable to large sizes.
+26
View File
@@ -8,14 +8,40 @@
#import <UIKit/UIKit.h>
/**
* A control similar to iOS' UIActivityIndicatorView modeled after Google's Material Design Activity spinner.
*/
@interface MMMaterialDesignSpinner : UIView
/** Sets the line width of the spinner's circle. */
@property (nonatomic) CGFloat lineWidth;
/** Sets whether the view is hidden when not animating. */
@property (nonatomic) BOOL hidesWhenStopped;
/** Specifies the timing function to use for the control's animation. Defaults to kCAMediaTimingFunctionEaseInEaseOut */
@property (nonatomic, strong) CAMediaTimingFunction *timingFunction;
/** Property indicating whether the view is currently animating. */
@property (nonatomic, readonly) BOOL isAnimating;
/**
* Convenience function for starting & stopping animation with a boolean variable instead of explicit
* method calls.
*
* @param animate true to start animating, false to stop animating.
@note This method simply calls the startAnimating or stopAnimating methods based on the value of the animate parameter.
*/
- (void)setAnimating:(BOOL)animate;
/**
* Starts animation of the spinner.
*/
- (void)startAnimating;
/**
* Stops animation of the spinnner.
*/
- (void)stopAnimating;
@end
+4
View File
@@ -69,6 +69,10 @@ static NSString *kMMRingRotationAnimationKey = @"mmmaterialdesignspinner.rotatio
}
}
- (void)setAnimating:(BOOL)animate {
(animate ? [self startAnimating] : [self stopAnimating]);
}
- (void)startAnimating {
if (self.isAnimating)
return;
+2
View File
@@ -5,6 +5,8 @@
[![License](https://img.shields.io/cocoapods/l/MMMaterialDesignSpinner.svg?style=flat)](http://cocoadocs.org/docsets/MMMaterialDesignSpinner)
[![Platform](https://img.shields.io/cocoapods/p/MMMaterialDesignSpinner.svg?style=flat)](http://cocoadocs.org/docsets/MMMaterialDesignSpinner)
![Demo](https://raw.githubusercontent.com/misterwell/MMMaterialDesignSpinner/master/Demo.gif "Pod Demo")
## Usage
To run the example project, clone the repo, and run `pod install` from the Example directory first.