         let offsetX = scrollView.contentOffset.x + scrollView.bounds.width * 0.5
         
         let count = Int(offsetX / scrollView.bounds.width)
-        
-        pageController.currentPage = count
+
+        pageController.currentPage = count % recycleModelArr!.count
     }
 }
 

extension RecycleHeaderView : UICollectionViewDataSource {

    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return recycleModelArr?.count ?? 0
    }
    
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kRecycleCellID, for: indexPath) as! RecycleHeaderCell

        cell.model = recycleModelArr?[indexPath.item]
        
        return cell
    }

            recycleCollecView.reloadData()
            
            pageController.numberOfPages = recycleModelArr!.count
            
            let path = IndexPath(item: recycleModelArr!.count * 50, section: 0)
            recycleCollecView.scrollToItem(at: path, at: .left, animated: false)
        }
    }
    
