我有一个NSMutableOrderedSet。
我需要枚举它,看起来集合内置的唯一选项是基于块的。因此,选择基于块的最简单选项,我有以下代码...
[anNSMutableOrderedSet enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([(SomeClass*)obj isWhatIWant]) {
*stop = YES;
// Ok, found what I'm looking for, but how do I get it out to the rest of the code?
}
}]