macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

setAnimationTransition:forView:cache:

トランジションアニメーションを定義します。
+(void)setAnimationTransition:(UIViewAnimationTransition)transition
                    forView:(UIView *)view
                    cache:(BOOL)cache

解説

返り値

( void )

引数

( UIViewAnimationTransition )transition

UIViewAnimationTransition


( UIView * )view
( BOOL )cache

クラス

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];
	
}