DGElasticPullToRefresh icon indicating copy to clipboard operation
DGElasticPullToRefresh copied to clipboard

How to Fire the Pull to Refresh?

Open ortizroberto opened this issue 8 years ago • 8 comments

It would be nice to have a method to fire the pull to refresh, something like objc dg_startLoading

ortizroberto avatar Nov 11 '15 07:11 ortizroberto

Hey. With a bounce effect?

gontovnik avatar Nov 11 '15 10:11 gontovnik

With bounce effect would be a big plus, but to fire without the bounce animation it's fine. Thanks for this project btw.

ortizroberto avatar Nov 11 '15 14:11 ortizroberto

I started working on this and I'm able to start the animation by changing the content offset of the scrollView.

func startAnimating() {
    scrollView()?.setContentOffset(CGPoint(x: 0, y: -DGElasticPullToRefreshConstants.MinOffsetToPull), animated: true)
}

The problem is that the UIScrollView doesn't bounce back and fires the actionHandler. Which property are you observing to detect when to refresh? I read the code for the last 2 hours but I couldn't find anything useful.

BalestraPatrick avatar Feb 13 '16 11:02 BalestraPatrick

+1

thiagorossener avatar Mar 17 '16 22:03 thiagorossener

There is "func dg_startLoading()" mentioned in the README, but it isn't there. Would anyone help about it? Thank you so much!

lorenzhk avatar Apr 08 '16 17:04 lorenzhk

Hi there,

any news about this?

There is actually a fix out there that works (see: https://github.com/Sunreaver/DGElasticPullToRefresh). Is it possible to pull this into the official repo?

Btw: Awesome refresher!

drakon avatar Apr 19 '16 19:04 drakon

+1 Is it possible? Any working solution? This one by drakon doesn't work for me.

sanderus2311 avatar Apr 30 '16 16:04 sanderus2311

@sanderus2311 The one from drakon works for me, what do you see?

joe528 avatar Jul 18 '16 09:07 joe528