前端之家收集整理的这篇文章主要介绍了
NSOperationQueue 依赖操作,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
NSOperationQueue * operationQueue = [[NSOperationQueue alloc]init];
NSInvocationOperation * invocationOp = [[NSInvocationOperation alloc]initWithTarget:self selector:@selector(invocationRun) object:nil];
NSBlockOperation * blockOp = [NSBlockOperation blockOperationWithBlock:^{
NSLog(@"blockOpRun_0");
}];
[invocationOp addDependency:blockOp];
[operationQueue addOperation:invocationOp];
[operationQueue addOperation:blockOp];
原文链接:https://www.f2er.com/javaschema/284202.html