setAnimationTransition:forView:cache:
トランジションアニメーションを定義します。
+(void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache
解説
返り値
( void )
フレームワーク
UIKit
クラス
UIView
Instance Methods
使用可能
iPhone2.0
参照
例文
-(IBAction)buttonAction:(id)sender{ //トランジションアニメーション [UIView beginAnimations:@"MyAnimation" context: nil ]; [UIView setAnimationDuration:1.0];//アニメーションの時間を設定 [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:theView cache:YES]; theView.image = [UIImage imageNamed:@"image2.jpg"]; //画像ビューを回転 if ( CGAffineTransformIsIdentity(theView.transform)){ CGAffineTransform trans; trans = CGAffineTransformMakeRotation(3.14/2);//90度 theView.transform = trans; } [UIView commitAnimations]; }