NSOperation exists on NSOperationQueue
Does anyone know a way of telling if an NSOperation is already on a NSOperationQueue without having to actually get the list of operations and compare with each of the items?
Thanks in advance, 开发者_StackOverflow中文版
You have to get the list, but it's not that taxing. If queue
and operation
are your objects:
[[queue operations] containsObject:operation];
精彩评论