【问题标题】:Make view controller change wait for end of custom animation?让视图控制器更改等待自定义动画结束?
【发布时间】:2013-07-03 14:55:27
【问题描述】:

我想在我的UIViewController 出现和消失时执行自定义动画。在消失的部分,我想知道我是否可以让它延迟一段时间,以便我在它消失之前执行过渡?所以UINavigationController 运行popViewController,然后让UIViewController 有时间在它发生之前做一个自定义动画。

这可能吗?

【问题讨论】:

    标签: iphone ios objective-c uiviewcontroller uinavigationcontroller


    【解决方案1】:

    您可以在按下返回按钮时使用此解决方案。

     [UIView animateWithDuration:1.0 animations:^{
                // your custom animation
            } completion:^(BOOL finished) {
                [self.navigationController popViewController];
            }];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 2017-03-26
      相关资源
      最近更新 更多