iOS - How to check if an NSOperation is in an NSOperationQueue?
问题 From the docs: An operation object can be in at most one operation queue at a time and this method throws an NSInvalidArgumentException exception if the operation is already in another queue. Similarly, this method throws an NSInvalidArgumentException exception if the operation is currently executing or has already finished executing. So how do I check if I can safely add an NSOperation into a queue? The only way I know is add the operation and then try to catch the exception if the operation