I want to write Tableview’s data into file .In tableview I have three column. how can I do that ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Data you are viewing in the Table must be coming from some Array or Dictionary.
Iterate through array or Dictionary to get each value of string (i suppose). Keep appending this values to an NSData. Then write this data to file using the method
Check this
//For Array NSMutableArray *contentArr = [[NSMutableArray alloc] init];//your array here NSMutableData *bodyData = [[NSMutableData alloc] init]; for (NSString *aStrData in contentArr) { [bodyData appendData:[aStrData dataUsingEncoding:NSUTF8StringEncoding]]; } [bodyData writeToFile:FilePath atomically:YES];