Skip to content

Instantly share code, notes, and snippets.

@congbo
Created March 18, 2015 03:17
Show Gist options
  • Save congbo/67945bd48aba11f95c9a to your computer and use it in GitHub Desktop.
Save congbo/67945bd48aba11f95c9a to your computer and use it in GitHub Desktop.
xcode 上 A -> navB -> B,A弹出的modal视图B需要显示导航栏,于是B embed 一个navigationController navB,这样A 需要传值给B时中间隔了一个navB
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"0"]) {
UINavigationController * nav = segue.destinationViewController;
LaunchTongChengTableViewController * vc = (LaunchTongChengTableViewController *)nav.topViewController;
if ([vc respondsToSelector:@selector(setScenarioType:)]) {
vc.scenarioType = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment