popViewControllerAnimated doesn't update info iPhone SDK

Posted by WrightsCS on Stack Overflow See other posts from Stack Overflow or by WrightsCS
Published on 2009-12-12T07:53:20Z Indexed on 2010/12/27 3:54 UTC
Read the original article Hit count: 204

Filed under:
|
|
|

When I try to pop a view controller, it doesnt update info for the previous view. Example: I have a cell that displays text in a label in View1. When you click on the cell it goes to View2 (for example) When I choose an option in View2, popViewControllerAnimated is used to go back to View1, however, I want the label to now be updated with the new option in View1.

My dilemma is that when I pop View2, the label in View1 does not update. Any ideas? I've tried adding a [view1 reloadData]; before the view pops, but no luck.

//VIEW1 the cell that displays the label.
    ringLabel = [[UILabel alloc] initWithFrame: CGRectMake(25, 12.7f, 250, 20)];
	ringLabel.adjustsFontSizeToFitWidth = YES;
	ringLabel.textColor = [UIColor blackColor];
	ringLabel.font = [UIFont systemFontOfSize:17.0];
	ringLabel.backgroundColor = [UIColor clearColor];
	ringLabel.textAlignment = UITextAlignmentLeft;
	ringLabel.tag = 0;
	ringLabel.text = [plistDict objectForKey:@"MYOPTION"];
	[ringLabel setEnabled:YES];
	[cell addSubview: ringLabel];
	[ringLabel release];


//VIEW2 when cell clicked 
    CustomProfileViewController *cpvc = [CustomProfileViewController alloc];
	cpvc.ringtone = [ringList objectAtIndex:indexPath.row];
	[cpvc.tblCustomTable reloadData];
    [self.navigationController popViewControllerAnimated:YES];

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview