I have two views of two subpages. Here I want to pass the value from one sub class of view to another. I searched the web, but can't find a clear answer. Can anybody provide an example for passing a UITextField
value from one to another?
I have two views of two subpages. Here I want to pass the value from one sub class of view to another. I searched the web, but can't find a clear answer. Can anybody provide an example for passing a UITextField
value from one to another?
You can maintain a common string in appDelegate.
Define a string
NSString *commString;
in appDelegate.
And then when you submit the uitextfield value just assign that text field value to the
appDelegate.commString
use this in the next view.
ProjectNameAppDelegate *appDelegate = [[UIApplication sharedApplicatoin] delegate];
appDelegate.commString = textField.text;
This will work for sure.