2013年12月のエントリー一覧
-
スポンサーサイト
スポンサー広告 - --/--/-- -
計算しながらアニメーションを描画してみる
animationDidStopの中で再びaddAnimationを呼び出しています。/** * アニメーション終了時 */- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag{ NSLog(@"ca終了 ht=%d", heightType); // 座標設定 switch (heightType) { case 1: jumpHeight = 300.0; kStartPos = CGPointMake(150, 300); kEndPos = CGPointMake(250, 300); h...
-
core animationの開始・終了イベント
core animationで開始イベント・終了イベントを受け取る方法は次の通りです。 // CAKeyframeAnimationオブジェクトを生成 animation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; animation.delegate = self; // デリゲートを指定/** * アニメーション開始時 */- (void)animationDidStart:(CAAnimation *)theAnimation{ NSLog(@"開始イベント発生");}/** * アニメーション終了時 */- (void)animationDi...