             let dotFrame = CGRect(x: 0, y: 0, width: CGFloat(length), height: CGFloat(length))
             let dot = DotView(color: colors[i], delay: self.delay*Double(i), frame: dotFrame)
             dot.center = CGPoint(x: self.frame.width/8 + CGFloat(i)*self.frame.width/4, y: self.frame.height/2)
+            dots.append(dot)
             self.addSubview(dot)
         }
     }

    }
    
    public func stop() {
        self.removeFromSuperview()
    }
    
    private func startAnimation() {

    private let myRed = UIColor.hexStr(hexStr: "#F74239", alpha: 1.0)
    private let myYellow = UIColor.hexStr(hexStr: "#FDBC02", alpha: 1.0)
    private let myGreen = UIColor.hexStr(hexStr: "#4AB552", alpha: 1.0)
    public var colors: [UIColor] = []
    private var dots: [DotView] = []
    
    public init(colors: [UIColor]?) {
        super.init(frame: CGRect(x: 0, y: 0, width: 150, height: 100))
