Skip to content

Commit

Permalink
React over completed state
Browse files Browse the repository at this point in the history
  • Loading branch information
3lvis committed Nov 15, 2014
1 parent d836c30 commit b7329ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion UIKit+AFNetworking/UIRefreshControl+AFNetworking.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task {
[notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil];

if (task) {
if (task.state != NSURLSessionTaskStateCompleted) {
if (task.state == NSURLSessionTaskStateCompleted) {
[self endRefreshing];
} else {
if (task.state == NSURLSessionTaskStateRunning) {
[self beginRefreshing];
} else {
Expand Down

0 comments on commit b7329ec

Please sign in to comment.