I know this question has been asked several times and I did read existing posts on this topic but I still need help.
I have 2 UIViewControllers
- parent and child. I display the child UIViewController
using the presentModalViewController
as below:
ChildController *child =
[[ChildController alloc] initWithNibName:@"ChildView" bundle:nil];
[self presentModalViewController:child animated:YES];
[child release];
The child view has a UIPickerView
. When user selects an item from UIPickerView
and clicks done, I have to dismiss the modal view and display the selected item on a UITextField
in the parent view.
In child's button click delegate
, I do the following:
ParentController *parent =
(ParentController *)[self.navigationController parentViewController];
[parent.myTextField setText:selectedText];
[self dismissModalViewControllerAnimated:YES];
Everything works without errors. But I don't know how to load the parent view so that it displays the updated UITextField
.
I tried
[parent reloadInputViews];
doesn' work. Please help.