This question already has an answer here:
I want to pass int or string data from one view to another, please help me
NSUInteger i1 = [array indexOfObject:username];
SSPUserLogedInViewController *logInView = [[SSPUserLogedInViewController alloc] init];
logInView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:logInView animated:YES completion:nil];
I am able to next view but not able to pass the data. Thanks in advance.
For Ex in your case;
Suppose you want to pass the value of an int
In Next view controller: copy this in
**.h**
file2. SSPUserLogedInViewController *logInView = [[SSPUserLogedInViewController alloc] init]; >
**.m**
fileEnjoy Programming!!
Write some function like
- (void)doSomeThing:(NSString) data
in yourSSPUserLogedInViewController
classand call
after
SSPUserLogedInViewController *logInView = [[SSPUserLogedInViewController alloc] init];
define NSMutableString *string; with property in the SSPUserLogedInViewController class. alloc init in view did load. You can set string like this.