iphone - 我如何在弹出 View Controller 上做一个翻转动画?

标签 iphone objective-c core-animation

我有一个翻转动画,它是这样的:

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/

相关文章:

iphone - 为什么 Apple 开发站点上的这段代码示例为同一个类声明了三个接口(interface)?

ios - 如何从 AudioQueueBufferRef 获取 CMSampleBufferRef

ios - 解析- [查询 findObjectsInBackgroundWithBlock :^. )]; block 不执行操作扩展

iphone - iOS5 UIButton 我应该尝试优化背景图片吗?

ios - 带有图像和文本的 UIButton 可能吗?

ios - 动画在开始前延迟

Objective-C 并比较两个 NSString

ios - 在 iOS 中获取按钮的颜色

iPhone 向右翻转按钮(如 iTunes)

ios - UIPageViewController 的 viewController subview 动画转换