I am developing an iPad application using sdk 5 and storyboard from an already working iPhone app (developed with separete xibs). I understand how storyboard works but I would like to push a view controller with arguments. Button calls logIn2 action like:
- (IBAction)logIn2: (NSString *)strUser: (NSString *)strPass
{
userViewController *UserViewController = [[userViewController alloc] initWithNibName:@"userViewController" bundle:nil stringOne:strUser stringTwo:strPass];
//UserViewController.hidesBottomBarWhenPushed = YES;
[[self navController] pushViewController:UserViewController animated:YES];
}
this was working properly but with sdk 5 returns an error at first line. How to push view with arguments? Thank you.
If you are saying that you want to convert your app to use Storyboard and Segues then you would make a Segue to push UserViewController. Put some properties in UserViewController to store the arguments. Then override prepareForSegue and set the properties in it. See this answer for more details:
Properly accessing a segue's destination view controller to assign protocol delegates