There are several things wrong with the code you're using. The crash is the result of setting an attributed string as the cell's identifier. From there, you should be dequeuing the cell before you try to assign values to its properties. You should also be initializing the attributed string from the object in your toDoItems array. Overall, I think this is what you meant to do:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellID = @"ListPrototypeCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
XYZToDoItem *toDoItem = [self.toDoItems objectAtIndex:indexPath.row];
if (toDoItem.completed) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
NSDictionary* attributes = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInt:NSUnderlineStyleSingle]};
NSAttributedString* attributedString = [[NSAttributedString alloc] initWithString:toDoItem.itemName attributes:attributes];
cell.textLabel.attributedText = attributedString;
} else {
cell.textLabel.text = toDoItem.itemName;
cell.accessoryType = UITableViewCellAccessoryNone;
}
return cell;
}