I want to save data to a specific index in my table.
Here's what I want to achieve theoretically:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:cell.label.text forKey:indexPath];
What is the correct way of doing this?
Try this
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:cell.label.text forKey:[indexPath description]];