diff --git a/renderer/native/ios/renderer/component/footerrefresh/HippyFooterRefresh.m b/renderer/native/ios/renderer/component/footerrefresh/HippyFooterRefresh.m index cb3d0435a13..d9cbfd7a1ea 100644 --- a/renderer/native/ios/renderer/component/footerrefresh/HippyFooterRefresh.m +++ b/renderer/native/ios/renderer/component/footerrefresh/HippyFooterRefresh.m @@ -109,7 +109,7 @@ - (void)refresh { [UIView animateWithDuration:.2f animations:^{ CGPoint bottomOffset = CGPointMake(0, self.scrollView.contentSize.height - self.scrollView.bounds.size.height + self.scrollView.contentInset.bottom); - [self.scrollView setContentOffset:bottomOffset animated:YES]; + self.scrollView.contentOffset = bottomOffset; } completion:^(BOOL finished) { self.status = HippyRefreshStatusStartLoading; }]; diff --git a/renderer/native/ios/renderer/component/headerrefresh/HippyHeaderRefresh.m b/renderer/native/ios/renderer/component/headerrefresh/HippyHeaderRefresh.m index a4a83164700..3cd57fac372 100644 --- a/renderer/native/ios/renderer/component/headerrefresh/HippyHeaderRefresh.m +++ b/renderer/native/ios/renderer/component/headerrefresh/HippyHeaderRefresh.m @@ -61,6 +61,14 @@ - (void)resetInset } } +- (void)refresh { + [UIView animateWithDuration:.2f animations:^{ + self.scrollView.contentOffset = CGPointMake(0, -self.bounds.size.height); + } completion:^(BOOL finished) { + self.status = HippyRefreshStatusStartLoading; + }]; +} + - (void)scrollViewDidEndDragging { if (_scrollView && -_scrollView.contentOffset.y > CGRectGetHeight(self.bounds)) { self.status = HippyRefreshStatusStartLoading;