In iOS Documentation usage of beginAnimation-commitAnimation is discouraged. So for animations and transitions there are new methods that make use of ^blocks. However when I use transitionWithView:duration:options:animations:completion method I get no transition effects.So if I write:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp
forView:self.view cache:YES];
firstView.hidden = YES;
secondView.hidden = NO;
[UIView commitAnimations];
it works but if I do it the following way
[UIView transitionWithView:self.view duration:1.0 options
UIViewAnimationCurveEaseIn|UIViewAnimationTransitionCurlUp
animations:^{
firstView.hidden = YES;
secondView.hidden = NO;
} completion:NULL
];
I do not get any transition effects. What am I missing?