【发布时间】:2015-12-10 09:02:05
【问题描述】:
我需要在UINavigationController 的根视图控制器出现之前将其传递给它。我在storyboard 中设置了它的root view controller 关系,我似乎无法像其他类型的segues 那样处理它。
我该怎么做?
谢谢
【问题讨论】:
标签: ios uinavigationcontroller storyboard segue
我需要在UINavigationController 的根视图控制器出现之前将其传递给它。我在storyboard 中设置了它的root view controller 关系,我似乎无法像其他类型的segues 那样处理它。
我该怎么做?
谢谢
【问题讨论】:
标签: ios uinavigationcontroller storyboard segue
您可以为 UINavigationController 分配一个 delegate 并实现该方法 -
- (void)navigationController:(UINavigationController *)navigationController
willShowViewController:(UIViewController *)viewController
animated:(BOOL)animated {
// check viewController is kind of class, check any flags
// pass object to vc
}
【讨论】: