いくつかの方法でiOSのアニメーション:

、CABasicAnimation基本的なアニメーション(場合、fromValueとtoValueの)

 
1485148932685541.png

二、CAKeyframeAnimationのキーフレームアニメーション:

図1に示すように、パスのキーフレームアニメーション経路
図2に示すように、値のキーフレームアニメーション(「S」字型アニメーション)
 
1485149812874038.png

三、UIViewのコールのコードブロック:

1、レイヤ的にCATransform3DIdentity。

romate.layer.transform = CATransform3DIdentity。

  [UIViewのanimateWithDuration:20

                        遅延:0

                      オプション:UIViewAnimationOptionAllowUserInteraction |

   UIViewAnimationOptionCurveLinear

                   アニメーション:^ {

                     romate.layer.transform = CATransform3DMakeRotation(M_PI / 4、0、0、1)。

                   }

                   完了:NULL

   ];

図2は、CGAffineTransformIdentity的図です。

 romate.transform = CGAffineTransformIdentity。

[UIViewのanimateWithDuration:100

                        遅延:0

                      オプション:UIViewAnimationOptionAllowUserInteraction |

   UIViewAnimationOptionCurveLinear

                   アニメーション:^ {

                     romate.transform = CGAffineTransformMakeRotation(M_PI)。

 

                   }

                   完了:NULL

   ];

 
 

おすすめ

転載: www.cnblogs.com/lijinfu-software/p/11531695.html