NSOperation class

Posted by Daniel Vela on July 30, 2011

NSOperation is useful for asynchronous executions:

@interface MyOp : NSOperation  
@end  
@implementation MyOp  
-(void) main {  
// Your work goes here  
}  
@end  

Sample usage:

NSOperationQueue = [[NSOperationQueue alloc] init];  
MyOp* op = [[MyOp alloc] init];  
[queue addOperation:op];  

20110324.21