[UIView animateWithDuration:1 animations:^{
self.animateView.frame = CGRectMake(100, 100, 50, 50);
} completion:^(BOOL finished) {
if (finished) {
NSLog(@"animation finished");
}
}];
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]];
NSLog(@"after runUntilDate");
So many code like above,that's why? What will happen if I comment the runUntilDate line?
update: If I add next line(NSLog) to the last,it will not execute until animation finished. Looks like runUntilDate blocks main thread, so why we need to block thread here?