View left expanded if pullToRefreshViewShouldStartLoading returns NO #8

nathanmbrown opened this Issue May 29, 2012 · 1 comment


None yet

2 participants


You need to change the end of the observeValueForKeyPath body so that expanded isn't always passed true, e.g.

BOOL expand = YES;
// Ask the delegate if it's cool to start loading
if ([_delegate respondsToSelector:@selector(pullToRefreshViewShouldStartLoading:)]) {
    if (![_delegate pullToRefreshViewShouldStartLoading:self]) {
        // Animate back to normal since the delegate said no
        newState = SSPullToRefreshViewStateNormal;
                    expand = NO;

// Animate to the new state
[self _setState:newState animated:YES expanded:expand completion:nil];
@soffes soffes added a commit that closed this issue May 30, 2012
@soffes Don't stay expanded if it doesn't start loading. Fixes #8
If the delegate returns no from `pullToRefreshViewShouldStartLoading:`, don't expand the view.
@soffes soffes closed this in 42d4d63 May 30, 2012
soffes commented May 30, 2012

Good call. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment