         }
         return max(0, index)
     }
-    weak var timer: Timer?
+    private weak var timer: Timer?
     
     // MARK: - 初始化方法
     override init(frame: CGRect) {

    }()
}
// MARK: - UICollectionViewDataSource & UICollectionViewDelegate
public extension MYCycleScrollView{
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int{
        return self.totalItemsCount
    }
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCellReuseIdentifier, for: indexPath) as! MYCollectionViewCell
        let index = indexPath.item % self.imageURLs.count
        cell.imageView.kf.setImage(with: URL(string: self.imageURLs[index]), placeholder:self.placehoder, options: [.transition(self.imageTransition)])

        super.init(coder: aDecoder)
        setupSubview()
    }
    override open func willMove(toSuperview newSuperview: UIView?) {
        if newSuperview == nil {
            self.invalidateTimer()
        }
