我有一个翻转动画,它是这样的:
Picker *picker = [[Picker alloc] init];
[self.navigationController pushViewController:picker animated:NO];
[UIView animateWithDuration:0.5
animations:^{
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
}
completion:^(BOOL finished){
}];
[picker release];
这非常有效。但是当我想做 popViewController 回来时,像这样:
[self.navigationController popViewControllerAnimated:NO];
[UIView animateWithDuration:0.5
animations:^{
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
}
completion:^(BOOL finished){
}];
但这行不通,只是返回到 View 而没有动画。
最佳答案
您是否尝试过调用popViewControllerAnimated
在动画结束后?
关于iphone - 我如何在弹出 View Controller 上做一个翻转动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5489950/