16种动画切换效果

来源:互联网 发布:java获取客户端浏览器 编辑:程序博客网 时间:2024/05/22 16:45

16种动画切换效果

 case 101:

            animation.type =kCATransitionFade;

           break;

       case102:

            animation.type =kCATransitionPush;

           break;

       case103:

            animation.type =kCATransitionReveal;

           break;

       case104:

            animation.type =kCATransitionMoveIn;

           break;

       case201:

            animation.type =@"cube";

           break;

       case202:

            animation.type =@"suckEffect";

           break;

       case203:

            animation.type =@"oglFlip";

           break;

       case204:

            animation.type =@"rippleEffect";

           break;

       case205:

            animation.type =@"pageCurl";

           break;

       case206:

            animation.type =@"pageUnCurl";

           break;

       case207:

            animation.type =@"cameraIrisHollowOpen";

           break;

       case208:

            animation.type =@"cameraIrisHollowClose";


副主题类型:

case 0:

            animation.subtype =kCATransitionFromLeft;

           break;

       case1:

            animation.subtype =kCATransitionFromBottom;

           break;

       case2:

            animation.subtype =kCATransitionFromRight;

           break;

       case3:

            animation.subtype =kCATransitionFromTop;


CATransition* animation = [CATransition animation];    [animation setDuration:0.5f];    [animation setType:kCATransitionFade];//波纹效果 @“rippleEffect”    [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];    [[self.view layer]addAnimation:animation forKey:@"switchView"];


    [[self.viewlayer] addAnimation:animationforKey:@"animation"];

0 0