             }
         }
     }
-    
+
     // MARK: - Views About
     func configViews() {
         self.totalPages = self.delegate?.numberOfImageViews()

            RunLoop.current.add(self.timer!, forMode: RunLoopMode.defaultRunLoopMode)
        }
    }
    
    func addMyViews() {
        self.scrollView.delegate = self
        self.scrollView.clipsToBounds = true

        let constraints2 = NSLayoutConstraint.constraints(withVisualFormat: "V:|[scrollView]|", options: NSLayoutFormatOptions.alignmentMask, metrics: nil, views: ["scrollView": self.scrollView])
        self.addConstraints(constraints1)
        self.addConstraints(constraints2)

        // 布局ImageViews
        let constraints3 = NSLayoutConstraint.constraints(withVisualFormat: "H:|[i1(width)][i2(width)][i3(width)]|", options: NSLayoutFormatOptions.alignAllTop, metrics: ["width": self.bounds.width], views: ["i1": self.prevImageView, "i2": self.curImageView, "i3": self.nextImageView])
        let constraints4 = NSLayoutConstraint.constraints(withVisualFormat: "V:|[i1(height)]|", options: NSLayoutFormatOptions.alignmentMask, metrics: ["height": self.bounds.height], views: ["i1": self.prevImageView])
        let constraints5 = NSLayoutConstraint.constraints(withVisualFormat: "V:|[i2(height)]|", options: NSLayoutFormatOptions.alignmentMask, metrics: ["height": self.bounds.height], views: ["i2": self.curImageView])
        let constraints6 = NSLayoutConstraint.constraints(withVisualFormat: "V:|[i3(height)]|", options: NSLayoutFormatOptions.alignmentMask, metrics: ["height": self.bounds.height], views: ["i3": self.nextImageView])
        //        self.prevImageView.backgroundColor = UIColor.red
        //        self.curImageView.backgroundColor = UIColor.green
        //        self.nextImageView.backgroundColor = UIColor.blue
        self.scrollView.addConstraints(constraints3)
        self.scrollView.addConstraints(constraints4)
        self.scrollView.addConstraints(constraints5)
        self.scrollView.addConstraints(constraints6)
        self.scrollView.setContentOffset(CGPoint(x: self.bounds.width, y: 0), animated: true)
    }

    // MARK: - Life Cycle
    override public func layoutSubviews() {
        super.layoutSubviews()
        self.layoutMyViews()
    }

    convenience public init() {
        self.init(frame: CGRect.zero)
    }

    override public init(frame: CGRect) {
        super.init(frame: frame)
        self.addMyViews()
    }

    required public init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self.addMyViews()
