NSInvocationOperation的使用 Apr 3rd, 2013 | Comments NSInvocationOperation的一个子类,在对NSOperation控制要求不高的情况下,可以使用。 例如: 1 2 3 4 5 6 7 8 9 10 NSInvocationOperation* op = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(doLongTimeTask) object:nil]; [myQueue addOperation:op]; [op release]; - (void)doLongTimeTask { //可以使用performSelectorOnMainThread来将得来的数据返回到主线程 }