我该如何让这个 UIButton
从 View 中慢慢消失?我正在寻找的动画会使按钮看起来像它的 widthrawing 向下。我应该使用 Core Animation
吗?我是 iPhone 开发的新手,但这似乎是可行的
最佳答案
似乎您只是想通过使用 UIView 的类方法 animateWithDuration:animations:
[UIView animateWithDuration:<some duration> animations:^{
myButton.center = (CGPoint){myButton.center.x, CGRectGetMaxY(self.view.frame) + (CGRectGetHeight(myButton.bounds)/2.0)};
}];
CoreAnimation 对于这个简单的操作来说太过分了。
关于ios - 使用动画显示和隐藏按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18179481/