2012-08-17 117 views

回答

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];