Sephiroth87 / ODRefreshControl

A pull down to refresh control like the one in Apple's iOS6 Mail App
MIT License
2.14k stars 385 forks source link

bug when fast dragging tableview #27

Closed ltfpeter closed 12 years ago

ltfpeter commented 12 years ago

Hi. There is a bug when I fast pull tableview down to refresh that will cause tableview cannot back to correct position. The refresh control works nice when I drag the tableview slowly. But when I fast drag, even like a swipe gesture on the tableview, the refresh control will send event to its target to begin refresh,while the tableview is still scrolling inertially. And before the scrolling stop, the refresh request has finished and ask refresh control to end refreshing. Because of the continuing scrolling, the refresh control still receive the scrolling event and finally "hang the tableview in the air" with a content offset...

I'm not sure whether my description can be understood, you can try this situation under a very fast WIFI. It will occur..

Thx.

ghost commented 12 years ago

I'm having the same problem after merging 27a5ba9ddf9be5a82bf77290628f74572dbdf65f into my fork. although I'm looking into it, i'm not sure i can fix it fast enough.

Sephiroth87 commented 12 years ago

I think the offending lines are these:

in endRefresh:

Removing them seems to solve the bug, and I honestly can't remember why they're there in the first place, they seem to be doing nothing actually useful... I'll investigate this a little more...

Sephiroth87 commented 12 years ago

So, I think it's fixed now, but a double check would be great, if you can :)

ghost commented 12 years ago

it works well for me

ltfpeter commented 12 years ago

This bug has been fixed. Thx