私は、送信者を受け入れ、UIbuttonで呼び出されるメソッドを持っています。そのオブジェクトをUIImageViewにキャストする方法を教えてください。基本的にボタンのコードを再利用するにはどうすればいいですか?キャスト送信者パラメータ
- (IBAction)startClick:(id)sender {
button.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"Pic_1.png"],
[UIImage imageNamed:@"Pic_2.png"],
[UIImage imageNamed:@"Pic_3.png"],
nil];
[button setAnimationRepeatCount:1];
button.animationDuration = 1;
[button startAnimating];
}
これは以前の質問と重複しています。http:// stackoverflow。com/questions/1088481/sender-tag –