0
爲什麼我的添加項不會保存在內存中?當我回到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];
}
所以,我需要知道我怎麼archieve內存列表後添加項目,感謝關注!
Eduardo Parucker。
如何在保存到addposto.postoArray後更新poscomb?你沒有發佈代碼。 – Jordan 2010-10-14 05:12:47