// 开始动画
[UIView beginAnimations:nil context:nil];
// 设置动画持续时间
[UIView setAnimationDuration:1.0];
// 提交动画
[UIView commitAnimations];
// 执行动画
[UIView animateWithDuration:0.25 animations:^{
// 存放需要执行动画的代码
} completion:^(BOOL finished)
{
// 动画执行完毕后会自动调用这个block内部的代码
}];