There are three operation classes in Foundation Framework(NSOperation
, NSInvocationOperation
and NSBlockOperation
).
I already
NSOperation is the base class. All operations extend NSOperation. But it is an abstract class, meaning that you need to subclass it and implement the code that performs the actual operation.
For simple cases, this (making your own subclass) is not necessary, however.
If you just want to pass a message to an object, you can use NSInvocationOperation. This is an implementation of NSOperation that can be parameterized with a selector and a target object.
If you just want to call one more blocks, you can use NSBlockOperation. This is an implementation of NSOperation that can be parameterized with a block to call.