- Create a variable for your passing data into your next view.
- Using an
instance of the next view, access the variable that you have created
in next view - assign your value to the variable
For Ex in your case;
-
Suppose you want to pass the value of an int
In Next view controller: copy this in
**.h**
file
@property (assign) int temp;
2.
SSPUserLogedInViewController *logInView =
[[SSPUserLogedInViewController alloc] init];
>
logInView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
logInView.temp = <YOUR_VALUE> [self presentViewController:logInView animated:YES completion:nil];
- In Next view controller: copy this in
**.m**
file
-(void)viewWillAppear
{
NSLog(@"My Value = %i",_temp);
}
Enjoy Programming!!
10
solved How to pass data from one view to another view in iphone [duplicate]