我正在尝试为自定义 UIButton 设置动画,但我的代码似乎不起作用。我在 ViewDidLoad 中使用它:
[UIView animateWithDuration:40.0 delay:0 options:UIViewAnimationOptionRepeat animations:^{
duckButton.frame = CGRectMake(120, 80, 120, 180);
duckButton.frame = CGRectMake(200, 90, 120, 180);
} completion:^(BOOL finished) {
}];
我应该怎么办?
[编辑:答案在评论中]