很抱歉,如果我的问题不明确。但我想通过在ChildViewController中调用[self.navigationController popViewControllerAnimated:YES];
方法来检测我的父ViewConroller显示的时间是否显示。
我知道workarroud在弹出时将变量传递给parentviewcontroller,但是如果有任何默认方法来检测它,那么它比workarround更好。
答案 0 :(得分:1)
您可以将父vc指定为UINavigationControllerDelegate的委托。在
navigationController:willShowViewController:animated:
你可以检查是self == viewController。如果是,则在调用导航控制器中的一个pop方法后显示此vc。