old mode 100755
new mode 100644
| | |
| | | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; |
| | | |
| | | if (task) { |
| | | #pragma clang diagnostic push |
| | | #pragma clang diagnostic ignored "-Wreceiver-is-weak" |
| | | #pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" |
| | | UIRefreshControl *refreshControl = self.refreshControl; |
| | | if (task.state == NSURLSessionTaskStateRunning) { |
| | | [self.refreshControl beginRefreshing]; |
| | | [refreshControl beginRefreshing]; |
| | | |
| | | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; |
| | | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; |
| | | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; |
| | | } else { |
| | | [self.refreshControl endRefreshing]; |
| | | [refreshControl endRefreshing]; |
| | | } |
| | | #pragma clang diagnostic pop |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | - (void)af_beginRefreshing { |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | #pragma clang diagnostic push |
| | | #pragma clang diagnostic ignored "-Wreceiver-is-weak" |
| | | [self.refreshControl beginRefreshing]; |
| | | #pragma clang diagnostic pop |
| | | }); |
| | | } |
| | | |
| | | - (void)af_endRefreshing { |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | #pragma clang diagnostic push |
| | | #pragma clang diagnostic ignored "-Wreceiver-is-weak" |
| | | [self.refreshControl endRefreshing]; |
| | | #pragma clang diagnostic pop |
| | | }); |
| | | } |
| | | |