DYDotsView 1.0.0

DYDotsView 1.0.0

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最新发布2017年3月

Dwarven 维护。



一个简单的视图,用于在 Objective-C 和 Swift 中显示脉冲点。

预览

Demo Gif

Podfile

要在 Xcode 项目中使用 CocoaPods 集成 DYDotsView,请在 Podfile 中指定它

Objective-C

pod 'DYDotsView'

Swift

pod 'DYDotsView-Swift'

如何使用

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()