这个方法主要是把数组写入一个plist中 简单但挺实用的。
-(void)writeToPlist:(NSArray *)uploadingfiles Name:(NSString *)name
{
NSMutableArray *sList = [[NSMutableArray alloc ]initWithCapacity:[uploadingfiles count] * 2];
for(uploadfile* tmp in uploadingfiles)
{
if(tmp.filename)
[sList addObject :tmp.filename];
else {
[sList addObject :@""];
}
if(tmp.filesize)
[sList addObject :tmp.filesize];
else {
[sList addObject :@""];
}
}
[sList writeToFile:getFullPath(name) atomically:YES];
}
|
|