I have a string containing multiple values from a tableview cell,the string maybe multiple or single values.My need is to export these values to googledoc.I have done it,but my problem is the values in the string is exported to googledoc in a single folder,i didn’t want this, i have to split the string continuing multiple values and upload it seperatily if it is a multiple value string.
My code for upload is
- (IBAction)doUpload:(id)sender
{
NSMutableString *str = [[NSMutableString alloc] initWithString:@"NOTES:"];
for (int i = 0; i<[appDelegate.notesArray count]; i++) {
// UPLOAD STRINGS HERE
if (selected[i])
[str appendFormat:@"%@ ,",[appDelegate.notesArray objectAtIndex:i]];
}
UploadView *uploadview = (UploadView *)self.view;
if (uploadview != nil)
{
[m_owner uploadString:str];
}
}
my tableviewcode didSelectRowAtIndexPath
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NSUInteger row = [indexPath row];
selected[row] = !selected[row];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = selected[row] ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
How to do this,Please help me.
Thanks in advance.
Just do the upload before append …