i can write to a text file on iphone..but each time i write my previous value is erased, is there any way to keep writing data separated by \\n??
this is my code
I dont fully understand the question, but you could try each time you are saving the text, first read the text already in the file then use the stringByAppendingString.For example, the code
NSString *begRainbow = @"Red orange yellow green";
NSString *fullRainbow = [begRainbow stringByAppendingString:@" blue purple"];
Leaves fullRainbow with a value of "Red orange yellow green blue purple".