UINavigationBar custom transition animation

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

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

UIViewControllerAnimatedTransitioning and UIViewControll

2条回答
  •  夕颜
    夕颜 (楼主)
    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 context) {
    
        // mess around with stuff here
    
    } completion:^(id context) {
    
        // all done now
    }];
    

提交回复
热议问题