16種動畫切換效果

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;

       case 1:

            animation.subtype =kCATransitionFromBottom;

           break;

       case 2:

            animation.subtype =kCATransitionFromRight;

           break;

       case 3:

            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.view layer] addAnimation:animation forKey:@"animation"];

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章