Recursive loading
andriyadi opened this issue · 3 comments
andriyadi commented
I managed to integrate this control to collection view. But somehow due to my special configuration, the refresher keep loading. Meaning, action
block keep called.
I managed to fix that by changing PullToRefreshView.swift
. I believe on line 132:
if (previousOffset < -(self.scrollViewInsetsDefaultValue.top + self.frame.size.height)) {
if (scrollView?.dragging == false && loading == false) {
loading = true
} else if (loading == true) {
labelTitle.text = "Loading ..."
} else {
labelTitle.text = "Release to refresh"
animator.changeProgress(-previousOffset / self.frame.size.height)
}
}
by considering scrollView insets. Please advice if you have better solution.
jcavar commented
Hi,
Thank you for reporting this.
I modified your solution and wrote tests for this problem.
Can you please review changes and test again?
andriyadi commented
Awesome! Your latest commit solves my problem. My initial solution doesn't deal with animation while pulling. So, yours is great!
Thanks!
jcavar commented
Great!
Thank you once again. :)