Open ipeisong opened 11 years ago
I'll work on it, thanks :)
Looking forward to this fix as well.
It should be fixed, but as usual, a round of double checking will be appreciated :)
Works good! Thank you!
Unrelated to this but since I have your attention, I added [self.scrollView scrollRectToVisible:CGRectMake(0, 0, 1, kOpenedViewHeight) animated:YES ]; to line 418. Basically when I manually call beginRefreshing, it doesn't it down automatically without scrollrecttovisible. I'm sure there is another way
It's not supposed to show the control when using beginRefreshing (see UIRefreshControl for reference). If you want, you can simply put that line after the call to beginRefreshing
Maybe I misunderstood the purpose of beginRefreshing but whats the point of calling it if you can't see the loading indicator?
Well, I'm not entirely sure, but I made it so it's consistent with Apple's implementation... I think it's just for when you have more than one way to trigger the refresh, like a button, so you can't trigger it twice...
Thanks for such a great component. I tried to achieve the same behaviour of SJApps (i.e. on beginRefresh, I'd like to animate-to-display the activity view). I tried with scrollRectToVisible:CGRectMake and in several other ways. Just wanted to let you know that they only way it works for me is by adding 1 pixel to the scroll height:
[self.scrollView scrollRectToVisible:CGRectMake(0, 0, 1, kOpenedViewHeight+1) animated:YES];
All other attempts (and there were many!) failed. Incidentally, I was thinking that beginRefresh:animate:BOOL and endRefresh:animate:(BOOL) could be added to the API.
Thanks!
Thank you :)
I have to say, I actually have no idea how that could work, since you are not scrolling where the control is, but below it...
I'm pretty sure this works just fine, unless you are doing something strange somewhere else :P
[refreshControl beginRefreshing]; [self.scrollView setContentOffset:CGPointMake(0, -44) animated:YES];
Now, if you tap the status-bar to scroll to top and then start pulling the table, the refresh control doesn't appear.
For myself I fixed it simply by adding:
...CGFloat offset = [[change objectForKey:@"new"] CGPointValue].y + self.originalContentInset.top;
if (_lastOffset == 0) {
_canRefresh = YES;
}
if (_refreshing) {...
In iOS 6 mail, only when your finger keep staying on screen to pull will trigger the refresh, which is the correct behavior.
This control is great, but my users complain very often they just scroll from bottom to top with a high acceleration, the refresh will also be trigger. Can fix this? Cos this also add more burden to server actually. Thanks.