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

    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] = []
    
    public init(colors: [UIColor]?) {
        super.init(frame: CGRect(x: 0, y: 0, width: 150, height: 100))

    }
    
    public func stop() {
        if #available(iOS 10.0, *) {
            let animator = UIViewPropertyAnimator(duration: 0.5, curve: .easeInOut) {
                for dot in self.dots {
                    dot.alpha = 0
                }
            }
            animator.startAnimation()
            animator.addCompletion { _ in
                self.removeFromSuperview()
            }
        } else {
            // Fallback on earlier versions
            print("It's only availabel from iOS 10")
        }
    }
    
    private func startAnimation() {
