I don't know what's wrong with this piece of code.
[UIView animateWithDuration:10.0f delay:0.0f options:UIViewAnimationOptionTransitionNone animations:^{ CGAffineTransform transform = CGAffineTransformMakeScale(0.1, 0.1); self.transform = transform; } completion:^(BOOL finished) { if (finished) { NSLog(@"Animation finished"); [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"NSShowHomeScreen" object:nil ]; } }];
Even with a 10 second duration, I get the console message "Animation finished" immediately as the animation starts.
I want to shrink / scale my first UIView and after that I'd like to show another UIView. But now the 2nd UIView gets displayed well before the shrink ends.
Any help would be greatly appreciated.
Thanks
Sorry it was my bad. I was also using UIPinchGestureRecognizer which was causing the problems. Anyway appreciate your quick reply..
Thanks
In the UIView documentation, for the transform property, says:
so maybe it cant be animated using the block methods, and you will have to use begin and commit wrappers around the animation