Skip to content

Commit

Permalink
修复当前正在刷新中时调用beginRefreshing方法使得header insert回置失败
Browse files Browse the repository at this point in the history
修复当前正在刷新中时调用beginRefreshing方法使得header insert回置失败
  • Loading branch information
JianYeee committed Jan 12, 2016
1 parent a21893d commit d2670fc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions MJRefresh/Base/MJRefreshComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,12 @@ - (void)beginRefreshing
if (self.window) {
self.state = MJRefreshStateRefreshing;
} else {
self.state = MJRefreshStateWillRefresh;
// 刷新(预防从另一个控制器回到这个控制器的情况,回来要重新刷新一下)
[self setNeedsDisplay];
// 预发当前正在刷新中时调用本方法使得header insert回置失败
if (self.state != MJRefreshStateRefreshing) {
self.state = MJRefreshStateWillRefresh;
// 刷新(预防从另一个控制器回到这个控制器的情况,回来要重新刷新一下)
[self setNeedsDisplay];
}
}
}

Expand Down

0 comments on commit d2670fc

Please sign in to comment.