缩小 UIViews(转换问题)
所以我使用了CGAffineTransform来放大,
CGAffineTransform newTrans2 = CGAffineTransformScale(mainView.transform,1.05,1.05);
mainView.transform = newTrans2;
我做了15次以获得动画效果。
现在我想缩小,使 mainView 适合 iPhone 框架 (0,0,320,480)。
此外,用户可以捏合和捏合,所以我真的想知道如何缩小并将其重置到原始空间。
我该怎么做?
So I've used CGAffineTransform to zoom in,
CGAffineTransform newTrans2 = CGAffineTransformScale(mainView.transform,1.05,1.05);
mainView.transform = newTrans2;
I do this 15 times to have an animation effect.
Now I would like to zoom out such that mainView fits the iPhone frame (0,0,320,480).
Besides, the user is able to pinch in and pinch out, so I really wonder how I can zoom out and reset it in the original space.
How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用 UIView 动画即可,简单而有效。按照您喜欢的方式配置它:
Just use UIView animation, which is simple yet effective. Configure it however you like: