 
 
     func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return cycleModels?.count ?? 0
+        return (cycleModels?.count ?? 0) * 10000
     }
     
     
     func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
         
         //取出模型
-        let cycleModel = cycleModels![indexPath.item]
-        
+        let cycleModel = cycleModels![(indexPath.item) % (cycleModels?.count)!]
         
         let cell = collectionView.dequeueReusableCellWithReuseIdentifier(kCycleCellID, forIndexPath: indexPath) as! CollectionCycleCell
         

    
    
    //定义属性
    var cycleModels: [CycleModel]?{
    
        didSet{

            
             //设置pageController的个数
            pageControl.numberOfPages = cycleModels?.count ?? 0
            //设置collectionView默认滚动位置
            let indexPath = NSIndexPath(forItem:(cycleModels?.count ?? 0) * 10, inSection: 0)
            
            collection.scrollToItemAtIndexPath(indexPath, atScrollPosition: .Left, animated: false)
            
            //添加定时器
            removeCycleTimer()
            addCycleTimer()
        }
    }

