- (void)viewDidLoad
{
angle = 0.0f;
imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"111.png"]];
imageView.center = self.view.center;
[self.view addSubview:imageView];
CGAffineTransform transfrom = CGAffineTransformMakeRotation(angle);
imageView.transform = transfrom;
[self.view setBackgroundColor:[UIColor redColor]];//设置背景为红色,效果直观明显
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context]; //标志动画开始 content传值:nil也不会错
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; //定义动画加速和减速方式
[UIView setAnimationDuration:2.0f]; //以秒为单位指定动画时长
[imageView setAlpha:0.0f]; //view changes go here
[UIView commitAnimations]; //标志动画块结束
}