You really want to use Grand Central Dispatch for this, but I would like to note that GCD has a method of building only for this kind of thing, it dispatch_apply()executes its block a certain number of times in the queue of your choice, of course, tracking what iteration you are on this way . Here is an example:
size_t iterations = 10;
dispatch_queue_t queue = dispatch_queue_create("com.my.queue", DISPATCH_QUEUE_SERIAL);
dispatch_apply(iterations, queue, ^(size_t i) {
NSLog(@"%zu",i);
dispatch_async(dispatch_get_main_queue(), ^{
});
});