UIView动画
我正在尝试在这里为 UIView
制作动画。它看起来像一个矩形,我只想将其转换为我的坐标。
那么,我怎样才能让它动起来呢?我试图找到一些教程,但没有成功。
I am trying to animate a UIView
here. It looks like a rectangle, and I just want to translate it to my coordinations.
So, how can I animate it? I tried to find some tutorials, but without success.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在iOS 4中,UIView块动画方法是最简单的:
http://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm /UIView/animateWithDuration:动画:
In iOS 4, the UIView block animation method is easiest:
http://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm/UIView/animateWithDuration:animations:
下面是一个将视图动画移出屏幕的示例。您应该能够根据您的需要稍微调整它:
Here is an example of animating a view to move off screen. You should be able to slightly adjust it for your needs:
使用“QuartzCore.framework”
有了这些动画。
Use "QuartzCore.framework"
With these animations.
绝对工作得很好。
Working Fine definitely.