动画:如何从正确的做出的UIButton移动视图加载时剩下什么? [英] Animation : How to make UIbutton move from right to left when view is loaded?
问题描述
喜
我还没有对iPhone开发的所有动画的东西为止。
Hi I have not done any animation stuff with iphone development so far.
任何人可以帮助我如何从右做出的UIButton移动视图加载时离开?
Can anybody help me how to make UIbutton move from right to left when view is loaded?
我要产生这样的效果:视图加载时,该按钮会出现从右端向左移动和放大器;停在自己的位置。这可能吗?
I want to generate effect like that : when view is loaded, the button appears moving from right end to left & stops at its place. Is it possible?
对于这个动画的东西任何帮助是AP preciated。请如果有一些示例帮助。
Any help regarding this animation stuff is appreciated. Please help with some sample if available.
先谢谢了。
推荐答案
只是为了使它更滑头,我会建议在不改变的UIView的框架,但它的中心;
Just to make it even slicker, I would suggest not changing the UIView's frame but its center;
CGPoint newLeftCenter = CGPointMake( 20.0f + myButton.frame.size.width / 2.0f, myButton.center.y);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0f];
myButton.center = newLeftCenter;
[UIView commitAnimations];
这篇关于动画:如何从正确的做出的UIButton移动视图加载时剩下什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!