adad184 / MMPulseView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MMPulseView

CocoaPods CocoaPods CocoaPods

A simple view to show circle pulse repeatly.

demo

Installation

The preferred way of installation is via CocoaPods. Just add

pod 'MMPulseView'

and run pod install. It will install the most recent version of MMPulseView.

If you would like to use the latest code of MMPulseView use:

pod 'MMPulseView', :head

Usage

pulseView.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
pulseView.colors = @[(__bridge id)[UIColor whiteColor].CGColor,
                     (__bridge id)[UIColor blackColor].CGColor,
                     (__bridge id)[UIColor whiteColor].CGColor];
pulseView.locations = @[@(0.3),@(0.5),@(0.7)];
pulseView.startPoint = CGPointMake(0, 0.5);
pulseView.endPoint = CGPointMake(1, 0.5);

pulseView.minRadius = 0;
pulseView.maxRadius = 100;

pulseView.duration = 3;
pulseView.count = 6;
pulseView.lineWidth = 3.0f;

[pulseView startAnimation];

Changelog

v1.0 first version

About

License:MIT License


Languages

Language:Objective-C 96.5%Language:Ruby 3.5%