How to access the parent view controller?
Posted
by tarnfeld
on Stack Overflow
See other posts from Stack Overflow
or by tarnfeld
Published on 2010-05-03T19:36:32Z
Indexed on
2010/05/03
19:48 UTC
Read the original article
Hit count: 327
I am using this code to push a view controller in ViewControllerA
:
DatePickerViewController *viewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil];
NSMutableArray *info = [[NSMutableArray alloc] initWithObjects:@"Exam Duration",nil];
[viewController setInfo:info];
[info release];
[self.navigationController pushViewController:viewController animated:YES];
[viewController release];
In the DatePickerViewController
that is slid in, it has a text field. In ViewControllerA
how can I get the value of this text field once the viewWillDisappear
method is fired, it's to save data.
© Stack Overflow or respective owner