gontovnik/DGElasticPullToRefresh

No work in CollectionView

fisland opened this issue · 0 comments

Hi, it is a beautiful refresh library, easy create in table
But it has a problem in Collection,can't drag to show ,but had run the function
scrollViewDidChangeContentOffset(dragging: false)

as below the code

 let loadingView = DGElasticPullToRefreshLoadingViewCircle()
        loadingView.tintColor = UIColor(red: 78/255.0, green: 221/255.0, blue: 200/255.0, alpha: 1.0)
        self.collectionView!.dg_addPullToRefreshWithActionHandler({ 
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(1.5 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: {
                self.collectionView!.dg_stopLoading()
            })
        }, loadingView: loadingView)
        
        self.collectionView!.dg_setPullToRefreshFillColor(UIColor(red: 57/255.0, green: 67/255.0, blue: 89/255.0, alpha: 1.0))
     
        self.collectionView!.dg_setPullToRefreshBackgroundColor(self.collectionView!.backgroundColor!)

that was test in the demo example code
Thank you