         return cell
     }
     
-   public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+    public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
         let index = indexPath.item % actualShows
         delegate?.collectionViewDidSelected(index: index)
     }

    
    public func scrollViewDidScroll(_ scrollView: UIScrollView) {
        //cell滑动过程中，当前页面判断
        let index = currentIndex() % actualShows
        delegate?.collectionViewDidEndDecelerating?(index: index)
    }
    
   public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
        if autoScroll {//启动定时器
            start()
        }
    }
    
   public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
       let index = autoScrolling ? (currentIndex() + 1) % actualShows : currentIndex() % actualShows
        delegate?.collectionViewDidEndDecelerating?(index: index)
       //页面滑动（无论是自动滑动还是手动拖拽）结束，修改状态
       autoScrolling = autoScroll
    }
}

    }
    
    //刷新滚动视图
    public func reloadLoopView(resource: [AnyObject]) {
        //数据源
        sourceArray = resource
    }
