File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,21 +203,19 @@ - (void)headerEndingAction {
203203- (void )headerRefreshingAction {
204204 // 默认使用 UIViewAnimation 动画
205205 if (!self.isCollectionViewAnimationBug ) {
206- MJRefreshDispatchAsyncOnMainQueue ({
207- [UIView animateWithDuration: self .fastAnimationDuration animations: ^{
208- if (self.scrollView .panGestureRecognizer .state != UIGestureRecognizerStateCancelled) {
209- CGFloat top = self.scrollViewOriginalInset .top + self.mj_h ;
210- // 增加滚动区域top
211- self.scrollView .mj_insetT = top;
212- // 设置滚动位置
213- CGPoint offset = self.scrollView .contentOffset ;
214- offset.y = -top;
215- [self .scrollView setContentOffset: offset animated: NO ];
216- }
217- } completion: ^(BOOL finished) {
218- [self executeRefreshingCallback ];
219- }];
220- })
206+ [UIView animateWithDuration: self .fastAnimationDuration animations: ^{
207+ if (self.scrollView .panGestureRecognizer .state != UIGestureRecognizerStateCancelled) {
208+ CGFloat top = self.scrollViewOriginalInset .top + self.mj_h ;
209+ // 增加滚动区域top
210+ self.scrollView .mj_insetT = top;
211+ // 设置滚动位置
212+ CGPoint offset = self.scrollView .contentOffset ;
213+ offset.y = -top;
214+ [self .scrollView setContentOffset: offset animated: NO ];
215+ }
216+ } completion: ^(BOOL finished) {
217+ [self executeRefreshingCallback ];
218+ }];
221219 return ;
222220 }
223221
You can’t perform that action at this time.
0 commit comments