iOS学习笔记(7):动画
13 Aug 2012内容:按钮移动,向下,隐藏,旋转,时长
- (IBAction)btnRight:(UIButton *)sender {
[UIView beginAnimations:@"moveRigtt" context:nil];
sender.center=CGPointMake(63, 200);
[UIView commitAnimations];
}
- (IBAction)btnHide:(UIButton *)sender {
[UIView beginAnimations:@"hide" context:nil];
[UIView setAnimationDuration:3];
sender.alpha=0;
[UIView commitAnimations];
}
- (IBAction)btnRotate:(UIButton *)sender {
[UIView beginAnimations:@"rotate" context:nil];
[UIView setAnimationDuration:2];
[UIView setAnimationRepeatCount:2];
sender.transform=CGAffineTransformRotate(sender.transform,M_PI_2);
[UIView commitAnimations];
}
转载请注明:于哲的博客 » iOS学习笔记(7):动画
