Try this:
//new array to overwrite the old
NSMutableArray *newData=[[NSMutableArray alloc] initWithArray:oldData];
if (isSelected) {
[newData removeObject:cell.textLabel.text]; //don't know where I should paste the code for removing object, this line no matter doesn't works
} else {
[newData addObject:cell.textLabel.text];
}