1、push效果
- (void)yc_transition:(UIView *)view {
CATransition *transtion = [CATransition animation];
[transtion setStartProgress:.2];
[transtion setEndProgress:.8];//设置动画进度,貌似平时用不上
transtion.duration = 0.3f;
[transtion setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];//动画速度
[transtion setType:@"push"];
[transtion setSubtype:kCATransitionFromRight];
transtion.removedOnCompletion = YES;//动画结束后删除
[view.layer addAnimation:transtion forKey:nil];//key随意设置,用来判断是否存在动画
}