I want to make one app and it include form submition . In this i create one new project by single view application. In this firstViewController I have put button and by pressing it , it redirect to secondViewController.
In this i have a form. and want to take data from user and by submit button i want to redirect this to thirdViewController and want to print the form data on thirdViewController.
In firstViewController.m file i have written
-(IBAction)nextVCButton:(id)sender
{
SecondViewController *tempView = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
NSLog(@"name : %@",self.nameTextField.text);
tempView.fullName = self.nameTextField.text;
[tempView setFullName:self.fullName];
[self.view addSubview:tempView.view];
}
In SecondViewController.m file
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
NSLog(@"received info %@", [self.fullName description]);
self.nameLabel.text = [self.fullName description];
}
In log i am getting (name :) value but in secondViewController received info is null.
I am doing this all by using xib file. No use of Storyboard.
Please help me to get this form data to secondViewController.
Thanks.