ios - Using storyboard unwinds, how do I take data from the view controller I'm returning from and use it in the view controller I returned to? -


I have everything applicable, and the following method comes back to the controller viewing source:

  - returned (IBAction): (UIStoryboardSegue *) segue {...}   

I want to take the value from UITextField into the footage I'm returning from, and so on. (Or idea that this method calls) is a value in my source view that is set to the value of UITextField

I have tried:

  - (IBAction) returned: (UIStoryboardSegue *) from {AddTextViewController * returnFromViewController = segue.destinationViewController; NSString * inputtedText = returnFromViewController.textField.text; Self.foo = inputtedText; }   

but I get this error:

  [RootViewController textfield]: Unexpected selector returned due to exception not found Example 0x8dc0250 *** Finished The application sent to 'NSInvalidArgumentException', Reason: '- [RootViewController textfield]: Unrecognized selector example sent to 0x8dc0250'   

Am I doing the wrong thing in that code? There is hardly any document on this, so it is very difficult to find yourself. If you are using the wrong controller you want sourceViewController of segue

destinationViewController . Otherwise, you're doing it right.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -