KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two view controllers, firstViewController and secondViewController . I am using this code to switch to my secondViewController (I am also passing a string to it): secondViewController *second = [[secondViewController alloc] initWithNibName:nil bundle:nil]; second.myString = @"This text is passed from firstViewController!"; second.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:second animated:YES]; [second release]; I then use this code in secondViewController to switch back to the firstViewController: [self dismissModalViewControllerAnimated:YES]; All of this works fine. My question is, how would I pass data to the firstViewController? I would like to pass a different string into the firstViewController from the secondViewController.
Tags (comma-separated)
Save Edits
Cancel