Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have two embedded views in a combined uiview controller. They are passed a user object when the prepareforsegue method is called. This looks like this:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

if ([segue.identifier isEqualToString:@"EditSegue"]) {

    self.userSubViewController = segue.destinationViewController;
    self.userSubViewController.user = self.user;
}

I also have a modalviewcontroller called MessageCreationViewController that receives input from the user and then returns to the combinedviewcontroller via an unwind segue. It returns to a done method that looks like:

- (IBAction)done:(UIStoryboardSegue *)segue{
    MessageCreationViewController *messageController = segue.sourceViewController;
    User *user = [[User alloc] init];
    user.description = messageController.message;
    self.userSubViewController.user = user;

}

I would like userSubViewController to reflect the input data from the modal view, but this does not occur because the prepareforsegue method is not triggered again. Pushing the user object at the end of the done method does not update the view.

Also the viewDidLoadMethod from the userSubVewController is not called again. That currently looks like:

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.label.text = [self.user message];
}

What do I need to do to trigger and update in the user object of the userSubViewController?

Thanks!

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.