Updated 14 December 2016
When we put lots of images to NSOperationQueue then we want to check our queue is completed or not.After completion of queue you want to perform some tasks (like you want to load another page).
1 2 3 4 5 6 7 8 9 10 11 12 13 |
(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{ if (object == self.queue && [keyPath isEqualToString:@"operations"]) { if ([self.queue.operations count] == 0) { } } else { [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } } |
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.