macOS/iOS API解説

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

目次

beginAnimations:context:

アニメーションブロックの設定をします。
+(void)beginAnimations:(NSString *)animationID
             context:(void *)context

解説

commitAnimationsでアニメーションを実行します。

返り値

( void )

なし

引数

( NSString * )animationID

アニメーションID

( void * )context

コンテキスト

クラス

UIView

Instance Methods

使用可能

iPhone2.0

参照

例文

-(IBAction)buttonAction:(id)sender{
	
	//ラベルを透明にするアニメーション
	[UIView beginAnimations:@"MyAnimation"
				context: nil ];
	[UIView setAnimationDuration:2.0];//アニメーションの時間を設定
	theLabel.alpha = 0.0f;
	[UIView commitAnimations];
	
}