1

ボタンを作成する代わりにこのボタンを再利用する方法

CGRect frame = tenBtn.frame;
CGRect frame1 = reffButton.frame;
frame.origin.x = frame1.origin.x; // new x coordinate
frame.origin.y = frame1.origin.y; // new y coordinate

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration: 3.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
tenBtn.frame = frame;
[UIView animateWithDuration:3.0 animations:^
 {
     [tenBtn setTransform:CGAffineTransformMakeScale(.4, .4)];

 }completion:^(BOOL finished) {
     tenBtn.hidden = YES;
}];
[UIView commitAnimations];

再起動ボタンをクリックしたときに作成するのではなく、ボタン (tenBtn) を元の位置またはフレームに移動させたい

4

0 に答える 0