如何绕z轴旋转ImageView+ iPhone?
我定制了一个轮播视图(照片库),当我滚动时,我希望图像向屏幕背面旋转。给人以图像以圆形方式移动的印象。
CGAffineTransformRotate
只是在 x 轴上旋转图像。我想以最终图像垂直于屏幕的方式旋转它。
人们有什么想法吗?
编辑: ** 我认为我的问题不清楚。我想要的是屏幕上的图像旋转并垂直于屏幕。它应该只能以直线形式可见。(或者它在 45' 处作为倾斜图像)?**
I have customized a carousel View(photo gallery) and when i scroll I want the images to rotate towards the back of the screen. To give the impression that the images are moving in a circular way.
CGAffineTransformRotate
just rotates the image on the x axis. I want to rotate it in such a way that finally the image is perpendicular to the screen.
Any thoughts people?
Edit:
** I dont think my question was clear. What i want is a image on the screen to rotate and be perpendicular to the screen. It should be visible only as a straight line.(or wen it is at 45' as a slant image)?**
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 CATransform3DRotate。您可以在此处查看一个基本示例:
CATransform3DRotate 和 UIImageView
希望这有帮助,
莫西
You can use CATransform3DRotate. You can see a basic example here:
CATransform3DRotate and UIImageView
Hope this helps,
Moszi