【发布时间】:2010-10-19 21:28:44
【问题描述】:
为什么我的添加项目没有节省内存?当我回到 RootViewController 我的列表消失了,发生了什么?
添加代码并正常工作...
- (IBAction) addButtonPressed: (id)sender {
NSLog(@"Add button pressed!");
addPosto *addposto = [[addPosto alloc] initWithNibName:@"postoDictionary" bundle:nil];
UINavigationController *addNavCon = [[UINavigationController alloc] initWithRootViewController:addposto];
addposto.postoArray = self.poscomb;
[self presentModalViewController:addNavCon animated:YES];
[addposto release];
[addNavCon release];
}
在 RootViewController 上选择“Meus Postos”行
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
postoLista *codigo = [[postoLista alloc] initWithNibName:@"postoLista" bundle:nil];
[self.navigationController pushViewController:codigo animated:YES];
[codigo release];
}
所以我需要知道添加项目后如何在内存中归档列表,谢谢关注!
爱德华多·帕鲁克。
【问题讨论】:
-
在 addposto.postoArray 中保存后如何更新 poscomb?您没有发布代码。
标签: iphone uitableview state