After reviewing your Apple docs, he also says:
Block-based animation methods (e.g. animateWithDuration: animations :) greatly simplify the creation of animations. With a single method call, you specify the animation and options for the animation. However, block-based animations are only available in iOS 4 and later. If your application works in earlier versions of iOS, you should use beginAnimations: context: and the methods of the commitAnimations class to mark the beginning and end of your animations.
I suppose that means they recommend it because it greatly simplifies the creation of animations. He also notes that he will not work with any devices that do not have ios 4. If you know how to use CAAnimation, I will continue to use it. I still use this without any problems:
- (void)switchTwoViews:(UIView *)view1 otherView:(UIView *)view2 direction:(int)directionRL{ view2.frame = CGRectMake(0, 0, 400, 211); visibleView = view2;
}
source share