【发布时间】:2011-01-01 12:53:24
【问题描述】:
我想制作从子视图到超级视图的过渡动画。
我使用以下方式显示子视图:
[UIView beginAnimations:@"curlup" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:.5];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[self.view addSubview:self.mysubview.view];
[UIView commitAnimations];
以上工作正常。它回到我没有得到任何动画的超级视图:
[UIView beginAnimations:@"curldown" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:.5];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES];
[self.view removeFromSuperview];
[UIView commitAnimations];
我应该做些什么不同的事情来让子视图在删除时进行动画处理?
【问题讨论】:
标签: ios iphone cocoa-touch uiview core-animation