Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道一种方法来判断 NSOperation 是否已经在 NSOperationQueue 上,而不必实际获取操作列表并与每个项目进行比较?
提前致谢,
你必须得到这份清单,但这并不那么费力。如果queue并且operation是您的对象:
queue
operation
[[queue operations] containsObject:operation];