0

我有一个自定义 UIControl,它将 UIControlEventValueChanged 事件传递回我的 ViewController。在某些情况下,我还需要对其进行动画处理(基本调整大小),但 UIControl 似乎没有 beginAnimations 或 commitAnimations 的实现。我必须将它封装在 UIView 中吗?有更好的解决方案吗?谢谢。

4

1 回答 1

0

UIControl 是 UIView,因此您可以只使用标准的 UIView 调用。

[UIView beginAnimations:nil context:nil];
[yourControl setFrame:theNewFrame];
[UIView commitAnimations];
于 2010-05-04T17:44:52.630 回答