TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Jonathan Vukovich Tribouharet.
JTBorderDotAnimation is a simple animation for have dots turning around a UIView on iOS.
With CocoaPods, add this line to your Podfile.
pod 'JTBorderDotAnimation', '~> 1.0'
Just import JTBorderDotAnimation.h
.
#import "JTBorderDotAnimation.h"
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIView *animatedView;
@property (strong, nonatomic) JTBorderDotAnimation *dotAnimation;
@end
Assign the view you want to animate and start the animation.
- (void)viewDidLoad
{
[super viewDidLoad];
self.dotAnimation = [JTBorderDotAnimation new];
self.dotAnimation.animatedView = self.animatedView;
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.dotAnimation start];
}
You can easily customize the animation.
numberPoints
duration
repeatCount
pointSize
pointColor
Example:
- (void)viewDidLoad
{
[super viewDidLoad];
self.dotAnimation = [JTBorderDotAnimation new];
self.dotAnimation.animatedView = self.animatedView;
self.dotAnimation.numberPoints = 6;
self.dotAnimation.duration = 6.;
self.dotAnimation.repeatCount = 3;
self.dotAnimation.pointSize = 5.;
self.dotAnimation.pointColor = [UIColor orangeColor];
}
clipsToBounds
property of the animatedView is set to NO
at the beginning of the animation.
JTBorderDotAnimation is released under the MIT license. See the LICENSE file for more info.