Objective c 如何设置removeFromSuperview的动画
我使用以下设置子视图外观的动画:Objective c 如何设置removeFromSuperview的动画,objective-c,ios,uiviewanimation,catransition,Objective C,Ios,Uiviewanimation,Catransition,我使用以下设置子视图外观的动画: CATransition *transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionReveal; [webView.layer addAnimation:transition forKey:nil]; [self.view addSubview:webView]; 但是现在我想删除我的子视图。如何添加动画来完成此操作?像
CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.type = kCATransitionReveal;
[webView.layer addAnimation:transition forKey:nil];
[self.view addSubview:webView];
但是现在我想删除我的子视图。如何添加动画来完成此操作?像其他的过渡?什么时候加这个?在添加子视图之前还是之后?您可以先在
animationAndListener
调用removeFromSuperView
[UIView animateWithDuration:0.5
delay:1.0
options: UIViewAnimationOptionCurveEaseOut
animations:^{
yourView.alpha = 0;
}completion:^(BOOL finished){
[yourView removeFromSuperview];
}];
不确定这是否已更改,但现在的选项是:UIViewAnimationOptionCurveEaseOut