首页 > 代码库 > CATransition常用动画及type

CATransition常用动画及type

    CATransition *transition = [CATransition animation];    transition.duration = 1.0f;    transition.type = @"cube";    transition.subtype = kCATransitionFromLeft;//设置方向    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];//设置时间模式    transition.delegate = self;    transition.removedOnCompletion = YES;//完成时清除    [self.navigationController.view.layer addAnimation:transition forKey:@"animate"]; 

kCATransitionFade; /*fade*/       交叉淡化过渡 
kCATransitionMoveIn; /*moveIn*/    新视图移到旧视图上面 
kCATransitionPush; /*push*/      新视图把旧视图推出去 
kCATransitionReveal; /*reveal*/     将旧视图移开,显示下面的新视图
cube             转立方体
pageCurl          翻上去
pageUnCurl        翻回来
suckEffect       收缩效果,如一块布被抽走 
rippleEffect       滴水效果
oglFlip          翻转效果