0
test1是tarbarcontorller中的第一个视图.. 我调用presentViewController后标签栏丢失 我该如何解决?致电presentViewController后标签栏丢失
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
TestTableViewController *TestTableViewController = [storyboard instantiateViewControllerWithIdentifier:@"test1"];
TestTableViewController.memberid = memberid;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:TestTableViewController];
[self.navigationController presentViewController:navigationController animated:YES completion:nil];
我想通过一个var到第一个viewcontorller。我怎样才能做到这一点?? –
如果我将故事板instantiateViewControllerWithIdentifier:@“test1”]更改为tarbarcontorller。 TestTableViewController.memberid = memberid; < - 崩溃。并且导航栏也是mssing。 –
如果您想将变量传递给下一个控制器,请使用segue。与TabBarController,它的作品[就像这样](http://stackoverflow.com/a/29573224/4020535)。 – Olivier