Skip to content

Commit

Permalink
Merge pull request CoderMJLee#497 from xiaozi4624/master
Browse files Browse the repository at this point in the history
修复当前正在刷新中时调用beginRefreshing方法使得header insert回置失败
  • Loading branch information
CoderMJLee committed Jan 13, 2016
2 parents a21893d + d2670fc commit 654c08f
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 654c08f

Please sign in to comment.