我创建了自己的NS行动子类,现在我想让其中的一些案例平行运行。因为这是一个同时同时进行的行动,所以我覆盖了它。
- (void)start {
[self willChangeValueForKey:@"isExecuting"];
isExecuting = YES;
[self didChangeValueForKey:@"isExecuting"];
error=NO;
startedSection=NO;
// start the task
[task launch];
}
- (BOOL)isConcurrent {
return YES;
}
- (BOOL)isExecuting {
return isExecuting;
}
- (BOOL)isFinished {
return isFinished;
}
当操作完成时执行下列代码:
[self willChangeValueForKey:@"isExecuting"];
[self willChangeValueForKey:@"isFinished"];
isExecuting = NO;
isFinished = YES;
[self didChangeValueForKey:@"isExecuting"];
[self didChangeValueForKey:@"isFinished"];
当我在将操作添加到 myQueue
之后添加 < my Queue wait all operations Arefinished> < my Queue wait all Offices Arefinished> 。 当我删除 < my Quee wait all Operations All All All All All Operations All All All All All All All All All All Appers Applements Appried]
< 之后添加 < /code> 。 当我删除了
< my, < my quie wait all Oll All All All All Oust All Apperations All All All All All All Offed] < < < < < /code> < 之后, < unt it but a facts a fact is a ex a / / unse access a unt unt access access access access access a / unt / unt un