对不起,我的英语不好
我需要将数据从我的第一个视图控制器传递到 SWRevealViewController 的前视图控制器
在我的第一个视图控制器中,我执行此代码
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"menu"]) {
SWRevealViewController *sw = (SWRevealViewController *) segue.destinationViewController;
// error is here i get nav with nil
UINavigationController *nav = (UINavigationController *)sw.frontViewController;
FrontViewController *home = (FrontViewController *) nav.topViewController;
home.passed_student = selected_student;
}
}