在4.0之前,讓View動作的語法如下:
UIButton *button = [[UIButton alloc] init];
CGRect frame = button.frame;
frame.origin.x = 500; // new x coordinate
frame.origin.y = 500; // new y coordinate
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration: 0.25];
button.frame = frame;
button.alpha = 0;
[UIView commitAnimations];