UINavigationBar custom transition animation

后端 未结 2 354
醉酒成梦
醉酒成梦 2020-12-31 14:18

I\'ve created custom transitions between view controllers using the following protocols:

UIViewControllerAnimatedTransitioning and UIViewControll

相关标签:
2条回答
  • 2020-12-31 14:56

    WWDC 2013 video #218 indicates that all custom transitions will crossfade the navigation bar, and that there's no way to customize this behavior.

    0 讨论(0)
  • 2020-12-31 15:05

    If your transition is both custom and interactive, then you can get some mileage out of UIViewControllerTransitionCoordinator.
    see Here.

    For example, in viewWillAppear of the view controller that is the "To" (target) vc:

    [[self transitionCoordinator] animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
    
        // mess around with stuff here
    
    } completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
    
        // all done now
    }];
    
    0 讨论(0)
提交回复
热议问题