如何将新添加的值保存到 NSMuttable 数组中,我想通过单击按钮重置新添加的项数组?有人可以帮我吗?
问问题
58 次
1 回答
1
通过执行以下操作添加它
array = [nsmutablearray arraywithcontentsoffile:path];
nsstring *item= @"string";
[array addObject:item];
[array writeToFile:path atomically:YES];
以不同的方法将其删除:
[array removeObjectAtIndex:1];
或者
[[NSFileManager defaultManager]removeItemAtPath:Path error:nil];
于 2012-08-17T04:15:57.207 回答