diff --git a/Class/CBStoreHouseRefreshControl.m b/Class/CBStoreHouseRefreshControl.m index 9a32d13..6b547f4 100644 --- a/Class/CBStoreHouseRefreshControl.m +++ b/Class/CBStoreHouseRefreshControl.m @@ -140,6 +140,15 @@ - (void)scrollViewDidScroll self.center = CGPointMake([UIScreen mainScreen].bounds.size.width/2, self.realContentOffsetY*krelativeHeightFactor); if (self.state == CBStoreHouseRefreshControlStateIdle) [self updateBarItemsWithProgress:self.animationProgress]; + + if (self.state == CBStoreHouseRefreshControlStateRefreshing) + { + CGFloat offset = MAX(self.scrollView.contentOffset.y * -1, 0.0f); + offset = MIN(offset, self.originalTopContentInset + self.dropHeight); + offset = MAX(offset, self.originalTopContentInset); + UIEdgeInsets contentInset = self.scrollView.contentInset; + self.scrollView.contentInset = UIEdgeInsetsMake(offset, contentInset.left, contentInset.bottom, contentInset.right); + } } - (void)scrollViewDidEndDragging