Ios 应用程序转到后台后未调用animationControllerForOperation

Ios 应用程序转到后台后未调用animationControllerForOperation,ios,objective-c,uinavigationcontroller,uiviewanimationtransition,Ios,Objective C,Uinavigationcontroller,Uiviewanimationtransition,我有一个使用UINavigationControllerDelegate的带有自定义导航推送转换的viewcontroller。当您启动动画、按下后退按钮等时,一切都会正常工作 但是,如果将viewcontroller推到堆栈上,在应用程序中设置背景,返回,然后按back,则委托方法animationControllerForOperation不会按其应有的方式调用。在调试过程中,我验证了当我们将应用程序返回前台时,self.navigationController.delegate仍然正确设置

我有一个使用UINavigationControllerDelegate的带有自定义导航推送转换的viewcontroller。当您启动动画、按下后退按钮等时,一切都会正常工作

但是,如果将viewcontroller推到堆栈上,在应用程序中设置背景,返回,然后按back,则委托方法animationControllerForOperation不会按其应有的方式调用。在调试过程中,我验证了当我们将应用程序返回前台时,self.navigationController.delegate仍然正确设置,但从未命中委托回调。有什么想法吗

 //presenting vc
 - (id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
                              animationControllerForOperation:(UINavigationControllerOperation)operation
                                           fromViewController:(UIViewController*)fromVC
                                             toViewController:(UIViewController*)toVC
{
    if (operation == UINavigationControllerOperationPush) {
        _animationObject = [LVDashboardExplainerAnimation new];
        _animationObject.presenting = YES;
        return _animationObject;
    } else if (operation == UINavigationControllerOperationPop) {
        _animationObject.presenting = NO;
        return _animationObject;
    }
    return nil;
}

//other VC
- (void)headerTapped {
    self.navigationController.delegate = _navigationDelegate; //correct object
    [self.navigationController popViewControllerAnimated:YES];
}
//演示vc
-(id)导航控制器:(UINavigationController*)导航控制器
AnimationControllerOperation:(UINavigationControllerOperation)操作
fromViewController:(UIViewController*)fromVC
toViewController:(UIViewController*)toVC
{
if(操作==UINavigationControllerOperationPush){
_animationObject=[LVDashboardExplainerAnimation new];
_animationObject.presenting=是;
返回_animationObject;
}else if(操作==UINavigationControllerOperationPop){
_animationObject.presenting=否;
返回_animationObject;
}
返回零;
}
//其他VC
-(无效)标题{
self.navigationController.delegate=\u navigationDelegate;//正确的对象
[self.navigationController PopViewControllerInitiated:是];
}

手动调用viewwill会出现问题:当应用程序从后台返回时,会显示动画。通过调用此函数,导航代理将调用willShowViewController:animated:但不调用navigationController:animationControllerForOperation:或didShowViewController:animated:

出于某种原因,强制调用viewwillappease会使整个过程变得混乱。即使我们考虑到这一点,并将导航委托设置为nil,然后返回正确的对象,该功能也不会正常工作。我猜这是SDK中的一个bug,但现在我们删除了对viewwillbeen的强制调用