その後のその後

iOSエンジニア 堤 修一のブログ github.com/shu223

アニメーションをAS3のTweenerっぽく書けるObjective-Cライブラリ TweenC

フリーで公開されてるライブラリ。
http://www.tweenc.com/


iPhoneにおけるアニメーションをこんな感じでTweener風に書けるようになります。

// animationViewを1秒かけて(20, 400)に移動させる
[TweenC animateView:animateView 
	withAnimation:kTweenEaseInExpo
		andDuration:1 
			toPoint:CGPointMake(20, 400) delegate:self];
	
// rotateViewを3秒かけて180度回転させる
[TweenC rotateView:rotateView 
			onAxis:@"x"
	 withAnimation:kTweenEaseInOutExpo
	   andDuration:3.0 
		 toDegrees:180 delegate:self];
	
// fadeOutViewのアルファを1秒かけて0.25にする
[TweenC fadeView:fadeOutView
		 toAlpha:0.25 
   withAnimation:kTweenEaseOutSine
	withDuration:1.0 
		delegate:self];
	
// scaleViewを1秒かけて0.5倍に縮小する
[TweenC scaleView:scaleView
		  toScale:0.5
	withAnimation:kTweenEaseOutSine 
	 withDuration:1.0 
		 delegate:self];


TweenerにあるBounce系のトランジションも使えます。
(Bounceはボヨヨーンと弾む感じのアレです)


(TweenC.hより)

// Bounce
@interface EaseInBounce : NSObject <TweenObject>{}
@end
@interface EaseOutBounce : NSObject <TweenObject>{}
@end
@interface EaseInOutBounce : NSObject <TweenObject>{}
@end


・・・で、ここまで紹介しておいてアレなんですが、
このライブラリ半年程前に案件で使用したことあって、
使用感としては「かなり微妙」でした。。


何がダメだったかというと、

  • バグバグ。全然指定した率で拡大縮小しない、とか、scaleViewとanimateViewを呼ぶ順番によって挙動が違う、とか。
  • Bounce系アニメーションを楽に書けそうだから導入したのに、Bounceの動作がなんかイマイチだった。
  • 2009年(iOS3.Xの時代)から更新されてない。もうメンテされないのかも。


というわけでそれ以降は使用しておりません。