如何判断一个VC调用ViewWillDisappear时,是自身出栈还是别的VC入栈

- (void)viewWillDisappear:(BOOL)animated{
    NSInteger index = [self.navigationController.viewControllers indexOfObject:self];
    if (index == NSNotFound){
        //出栈
    }else{
        //别的入栈
    }
}

你可能感兴趣的:(如何判断一个VC调用ViewWillDisappear时,是自身出栈还是别的VC入栈)