UIView removeFromSuperview

thn*_*iss 2 iphone uiview uiviewanimationtransition

removeFromSuperview方法实际上非常快速地拉出图像,有没有办法以动画方式删除它.谢谢

Vla*_*mir 7

如果您的目标是iOS4(来自UIView文档的代码段):

[UIView animateWithDuration:0.2
                 animations:^{ table.alpha = 0.0; }
                 completion:^(BOOL finished){ [table removeFromSuperview]; }];
Run Code Online (Sandbox Code Playgroud)