我们经常使用的系统的转场动画一般有两种
+(void)transitionWithView:(UIView *)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion;
通过这个方法我们可以重新绘制视图view,任何子视图的改变或者view本身的改变都会触发该方法,UIViewAnimationOptions的类型选择可以查看UIViewAnimationOptions有关转场动画的类型介绍
+(void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion;
这个方法用于切换两个视图view,作用于fromView的父视图,会将fromView 从其父视图上移除,将toView展示在父视图上,通常用于小说翻页效果的实现UIViewAnimationOptions同上介绍