-(void)viewWillDisappear:(BOOL)animated {
NSInteger index = [self.navigationController.viewControllers indexOfObject:self];
if(index == NSNotFound) {
//即将出栈,销毁
} else {
//只是保存状态,暂停 }
[super viewWillDisappear:animated];
}
}
iOS开发如何判断当前控制器进出栈状态
最新推荐文章于 2022-04-15 17:20:30 发布