【发布时间】:2012-05-29 00:26:11
【问题描述】:
在我正在制作的应用程序中,我试图让一个按钮在屏幕外启动并在屏幕上移动。我不知道如何从屏幕外的按钮开始,但我知道一旦我弄清楚了,我可以执行以下代码:
[UIView beginAnimation:@"animate" context: nil];
[UIView setAnimationDuration:3];
self.myButton.frame = CGRectMake (20, 100, 40, 80);
//Other animations
[UIView commitAnimations];
另外,在[UIView beginAnimation:@"animate" context:nil]; 行中,上下文参数是否要求CGContextRef?
【问题讨论】:
标签: iphone objective-c ios core-animation core-graphics