Created
April 26, 2013 20:56
-
-
Save rbarbera/5470383 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__block NSUInteger outerIndex = -1; | |
[lista enumerateObjectsUsingBlock:^(NSString *word, NSUInteger idx, BOOL *stop) { | |
__block NSUInteger innerIndex = -1; | |
[datos enumerateObjectsUsingBlock:^(NSString *palabra, NSUInteger indice, BOOL *parada) { | |
if ([word isEqualToString:palabra]) { | |
NSLog(@"log1: coinciden el %d", indice); //(log1) si pongo este log deja de aparecer el log3 | |
innerIndex = idx; | |
*parada = YES; | |
} | |
}]; | |
if (innerIndex!=-1) outerIndex = innerIndex; | |
NSLog(@"log2: vamos por %@", word); // (log2) si pongo este log dejan de aparecer log3 y log1 | |
}]; | |
NSLog(@"log3: You've stopped at index %i by word [%@]",outerIndex, lista[outerIndex]); // (log3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment