does animateWithDuration:animations: block main thread?

Animating with blocks doesn’t block the main thread. I think the behavior you’re seeing is because, by default, user interaction is disabled duration animation with the new block calls. You can override this by passing UIViewAnimationOptionAllowUserInteraction (calling animationWithDuration:delay:options:animations:completion), like this:

-(IBAction) fadeUsingBlock {
    NSLog(@"V1: Clicked ...");
    [myLabel setAlpha:1.0];
    [UIView animateWithDuration:1.5 
                          delay:0
                        options:UIViewAnimationOptionAllowUserInteraction
                     animations:^{
                         [myLabel setAlpha:0.0];
                     }
                     completion:nil];
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)