【发布时间】:2012-08-17 04:02:42
【问题描述】:
如何将新添加的值保存到 NSMuttable 数组中,我想通过单击按钮重置新添加的项数组?谁能帮助我?
【问题讨论】:
标签: iphone ios uitableview uibutton
如何将新添加的值保存到 NSMuttable 数组中,我想通过单击按钮重置新添加的项数组?谁能帮助我?
【问题讨论】:
标签: iphone ios uitableview uibutton
通过以下方式添加它
array = [nsmutablearray arraywithcontentsoffile:path];
nsstring *item= @"string";
[array addObject:item];
[array writeToFile:path atomically:YES];
用不同的方法删除它:
[array removeObjectAtIndex:1];
或
[[NSFileManager defaultManager]removeItemAtPath:Path error:nil];
【讨论】: