tags:

views:

36

answers:

1

What is the most simple and efficient way of saving an array of strings ? Store the Array in DISK

+3  A: 
NSMutableArray *myMutableArray = [[NSMutableArray alloc] initWithCapacity:100];
int x = 0;
for(x=0; x<100;x++) {
    [myMutableArray insertObject: [NSString stringWithFormat:@"This is NSString number %d!",x+1] atIndex:x];
}

[myMutableArray writeToFile:filePath atomically:YES];
Aaron Saunders