I have class MyOperation : NSOperation
with @property (nonatomic, retain) NSString *oID;
And sometimes I need to cancel operation with specific oID
. I'm trying to do this:
NSArray *operations = operationQueue.operations;
NSPredicate *predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat: @"oID == %@", _specificID]];
NSArray *arrayOperations = [operations filteredArrayUsingPredicate: predicate];
and get error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "oID == 0f5db97b-f127-4425-ad79-451d1f204016"'
Is it possible to filter operation from NSOperationQueue?