File tree Expand file tree Collapse file tree
Coding_iOS/Vendor/ODRefreshControl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929@interface ODRefreshControl ()
3030
31- @property (nonatomic , readwrite ) BOOL refreshing, isEndingRefreshing ;
31+ @property (nonatomic , readwrite ) BOOL refreshing;
3232@property (nonatomic , assign ) UIScrollView *scrollView;
3333@property (nonatomic , assign ) UIEdgeInsets originalContentInset;
3434
@@ -74,7 +74,6 @@ - (id)initInScrollView:(UIScrollView *)scrollView activityIndicatorView:(UIView
7474 [self addSubview: _activity];
7575
7676 _refreshing = NO ;
77- _isEndingRefreshing = NO ;
7877 _canRefresh = YES ;
7978 _ignoreInset = NO ;
8079 _ignoreOffset = NO ;
@@ -391,12 +390,11 @@ - (void)beginRefreshing
391390
392391- (void )endRefreshing
393392{
394- if (_refreshing ) {
393+ if (_refreshing) {
395394 // Create a temporary retain-cycle, so the scrollView won't be released
396395 // halfway through the end animation.
397396 // This allows for the refresh control to clean up the observer,
398397 // in the case the scrollView is released while the animation is running
399- _isEndingRefreshing = YES ;
400398 __block UIScrollView *blockScrollView = self.scrollView ;
401399 [UIView animateWithDuration: 0.4 animations: ^{
402400 _ignoreInset = YES ;
@@ -419,7 +417,6 @@ - (void)endRefreshing
419417 [blockScrollView setContentInset: self .originalContentInset];
420418 _ignoreInset = NO ;
421419 _refreshing = NO ;
422- _isEndingRefreshing = NO ;
423420 }];
424421 }
425422}
You can’t perform that action at this time.
0 commit comments