关于图片缩放或旋转,的确很简单,几句代码就OK。如下是缩放代码
//动画开始
[UIView beginAnimations:nil context:nil];
//缩放时间
[UIView setAnimationDuration:0.5];
_imageView.transform = CGAffineTransformMakeScale(0.5, 0.5);
//动画结束
[UIView commitAnimations];
但很多初学者会出现这个问题: 图片缩放/旋转的参考点怎么是图片的原点呢?怎么不是以图片的中心呢?
解决方案:点击.storyboard 文件 然后把use auto layout的勾去掉 ,即可!