How to reload a uiviewcontroller on the iPhone

Posted by Buffernet on Stack Overflow See other posts from Stack Overflow or by Buffernet
Published on 2009-07-18T23:38:19Z Indexed on 2010/05/30 14:02 UTC
Read the original article Hit count: 464

Hi, I'm trying to reload a value I set on UIViewController to update each time I transition with this code (coming and going are both UIViewControllers):

    coming.phoneNumber = aPhoneNumber;
    [coming viewWillAppear:YES];
[going viewWillDisappear:YES];
[going.view removeFromSuperview];
[self.window insertSubview: coming.view atIndex:0];
[going viewDidDisappear:YES];
[coming viewDidAppear:YES];

when the phone number value changes in the coming view it never shows up when the view is inserted into the subview. How do I make view show the updated phone number?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c