Hi
I have the following situation:
1) On the main ViewController, I have 3 UITextFields. The user can fill them with keyboard or choose values from 3 ViewsController, which have a Picker to choose from values;
2) Now, I can declare 3 NSString in the main View Controller (obviously with @property(retain, nonatomic) so that they are to be seen from the 3 ViewController with Picker), then go to the first of the 3 ViewController's with Picker and populate the fist NSString, as I go back to the main ViewController. In this way I can update the text of the first UITextField on the main VC.
3) The problem is that, when I go to the second ViewController and choose a value from Picker and I go back to the main ViewController the first value disappears.
I know that ViewDidLoad is called in this case and, obviously, the first value is lost. On the other hand, If I go back to the main ViewController using the dismiss command, not calling ViewDidLoad, the interface is never updated.
So, which is the solution in these cases? I thought on NSUserDefaults, but it has no sense, as far as I can see...
Any help is appreciated!
Thanks Fabio