DYDotsView-Swift 1.0.1

DYDotsView-Swift 1.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2019
SPMSupports SPM

Maintained by Dwarven.



DYDotsView

A simple view that show pulsing dots for Objective-C and Swift.

Preview

Demo Gif

Podfile

To integrate DYDotsView into your Xcode project using CocoaPods, specify it in your Podfile:

Objective-C

pod 'DYDotsView'

Swift

pod 'DYDotsView-Swift'

How to use

Objective-C

    #import "DYDotsView.h"
    DYDotsView * dots = [[DYDotsView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
    [dots setNumberOfDots:@5];
    [dots setDuration:@0.4];
    [dots setBackgroundColor:[UIColor clearColor]];
    [dots setDotsColor:[UIColor redColor]];
    [dots startAnimating];
    [dots setCenter:self.view.center];
    [self.view addSubview:dots];
    
    //[dots stopAnimating];

Swift

     var dots = DYDotsView(frame: CGRect(x: 0, y: 0, width: 300, height: 30))
     dots.numberOfDots = 5
     dots.duration = 0.4
     dots.backgroundColor = .clear
     dots.dotsColor = .red
     dots.startAnimating()
     dots.center = self.view.center
     self.view.addSubview(dots)
     
     //dots.stopAnimating()