Created
November 17, 2014 08:18
-
-
Save Galarius/9491b278d110cadfc545 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
// wait until completion functions get called by method inside loop. | |
for(Object *o in objects) | |
{ | |
__block BOOL block = YES; | |
[self applyMethod:o success:^(id result) { | |
//... | |
block = NO; | |
} failure:^(NSError *error) { | |
//... | |
block = NO; | |
}]; | |
while (block) | |
{ [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment