开发者

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];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜