Reputation: 259
i'm having a variable in NSInteger which i want to pass from FirstViewController to SecondViewController. In viewDidload of FirstViewController i have this
SecondViewController*detail = [self.storyboard instantiateViewControllerWithIdentifier:@"Second"];
detail.integer2= self.integer1;
NSLog(@"VARIABLE PASSED----%d",detail.integer2 );
NSLog is showing exactly what i want to pass. my question is how can i retrieve passed value in SecondViewController.
Upvotes: 1
Views: 200
Reputation: 15147
Make Property of integer2
in SecondViewController
and use as self.integer2
in SecondViewController
Upvotes: 2