i have a text file so can i update this text开发者_如何学运维 file from web ??? lets say i have
1. NSString *filePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"];
2. NSData *myData = [NSData dataWithContentsOfFile:filePath];
3. if (myData) {
4. // do something useful
5. }
right now Myfile.text is having 10 data so how to insert 10 more to this data??
plz help
Files stored inside your app bundle will not be writable.
You will have to make a copy of the file and store it in the Documents or Library folder before you will be able to edit it.
精彩评论