CoreAnimationでの3D回転とPerspective表示

「CoreAnimationでの3D回転とPerspective表示」の編集履歴(バックアップ)一覧はこちら

CoreAnimationでの3D回転とPerspective表示」(2010/09/11 (土) 15:15:47) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

CoreAnimationを使ってUIViewを回転させるとき、3D回転や表示をさせるためには、 下の例のように、Rotateしたあとに、別のRotateとはConcatする必要がある。 また、Perspective表示にする場合には.m34の設定をおこなう。 // コンパスアイコンの回転(3Dパースペクティブ) CATransform3D commpassTransform = CATransform3DIdentity; commpassTransform = CATransform3DRotate(commpassTransform, -M_PI*magHeading/180.0, 0, 0, 1); commpassTransform = CATransform3DConcat(commpassTransform, CATransform3DMakeRotation(M_PI*50.0/180.0, 1, 0, 0)); CATransform3D perspective = CATransform3DIdentity; perspective.m34 = 1.0 / -80; commpassTransform = CATransform3DConcat(commpassTransform, perspective); compassView.layer.transform = commpassTransform;

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。