[Solved] How to pass data from one view to another view in iphone [duplicate]


  1. Create a variable for your passing data into your next view.
  2. Using an
    instance of the next view, access the variable that you have created
    in next view
  3. assign your value to the variable

For Ex in your case;

  1. 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];
  1. 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]