Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong position of the pullToRefreshView #94

Open
anphanngocvn opened this issue Aug 29, 2019 · 1 comment
Open

Wrong position of the pullToRefreshView #94

anphanngocvn opened this issue Aug 29, 2019 · 1 comment

Comments

@anphanngocvn
Copy link

@gontovnik Thank you for making this nice control.

I used this nice control to our application to pull refresh the data on the UICollectionView. But I am facing with a problem when I set contentInset of the collectionView to any values. Hereunder is my code:

`colView.contentInset = UIEdgeInsets(top: 0, left: 50, bottom: 0, right: 50)

    let loadingView = DGElasticPullToRefreshLoadingViewCircle()
    loadingView.tintColor = .red
    colView.dg_addPullToRefreshWithActionHandler({ [weak self] in
        self?.delay(3, closure: {
            self?.colView.dg_stopLoading()
        })
        }, loadingView: loadingView)
    colView.dg_setPullToRefreshFillColor(.blue)
    colView.dg_setPullToRefreshBackgroundColor(.red)`

The problem is the X position of the pullToRefreshView start at the contentInset 50 but it end of the screen.
Simulator Screen Shot - iPhone XS Max - 2019-08-29 at 22 39 08

My expectation to have the pullToRefreshView starts at the beginning of the screen instead.

Anyone else have the same issue? Could you please tell me how to fix this?

Thanks!

@MarcSteven
Copy link

MarcSteven commented Nov 9, 2020

@anphanngocvn Use MJRefresh instead of the library
MJRefresh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants