iOS图片旋转
2013-07-29 16:59
295 查看
UIImageView *im = [[UIImageView alloc] initWithFrame:CGRectMake(30, 50, 200, 200)];
im.image = [UIImage imageNamed:@"1.jpg"];
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
animation.delegate = self;
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, 1.0)];
animation.duration = 0.2;
animation.cumulative = YES;
animation.repeatCount = INT_MAX;
[im.layer addAnimation:animation forKey:@"animation"];
[self.view addSubview:im];
im.image = [UIImage imageNamed:@"1.jpg"];
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
animation.delegate = self;
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, 1.0)];
animation.duration = 0.2;
animation.cumulative = YES;
animation.repeatCount = INT_MAX;
[im.layer addAnimation:animation forKey:@"animation"];
[self.view addSubview:im];
相关文章推荐
- iOS开发——手势识别器(用手势实现图片旋转和缩小放大)
- iOS 图片旋转方法
- iOS 中图片旋转的方法
- iOS开发动画(Animation)图片360度不停旋转
- iOS开发——UI进阶篇(十八)核心动画小例子,转盘(裁剪图片、自定义按钮、旋转)图片折叠、音量震动条、倒影、粒子效果
- JS 解决 IOS 中拍照图片预览旋转 90度 BUG
- iOS开发- 相机(摄像头)获取到的图片自动旋转90度解决办法
- cordova的camera插件,IOS下图片旋转问题
- iOS 对Image图片本身进行旋转0,90,180,270
- iOS保存系统相册中的照片到应用沙盒中出现的问题--图片旋转90度,使用CGImageRelease造成应用崩溃
- 转载 iOS开发动画(Animation)图片360度不停旋转
- iOS开发中实现图片旋转,造成横屏…
- [ios开发]锁屏后的相机的方向检查,与图片的自动旋转
- 【IOS】旋转图片和截取图片
- iOS开发动画(Animation)图片360度不停旋转
- iOS解决拍照图片 会旋转 打开变形的问题
- iOS 归档UIImageView后,再解档,imageview的图片出现自动旋转
- iOS用三个手势和仿射变换实现图片的旋转缩放移动效果(类iBooks教科书)
- iOS:图片的旋转方向问题
- iOS开发——图片360°旋转动画