我尝试此代码,但它对我无效。 谢谢如何在iOS中的不同视图控制器之间传递变量
-(void)passvar:(NSString *)user
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *viewController = (UIViewController *)[storyboard instantiateViewControllerWithIdentifier:@"signupvc"];
viewController.user = user;
[self presentViewController:viewController animated:YES completion:nil];
}
什么不正确? – Larme