Yes, this behavior is correct. Cells automatically generated by an SCArrayOfObjectsSection do not have a bound object. Here is some sample code to illustrate how to access the bound object for these cells:
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
willDisplayCell:(SCTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
SCArrayOfObjectsSection *section = (SCArrayOfObjectsSection *)[tableViewModel sectionAtIndex:indexPath.section];
NSManagedObject *managedObject = [section.items objectAtIndex:indexPath.row];
NSLog(@" %@", managedObject);
// your code here
}
Also, please note that you have two other SCTableViewModelDelegate methods that get called as a new object is being created:
1- tableViewModel:itemCreatedForSectionAtIndex:item: -This is called when the user taps the add button and the object is first created, but before actually being added to the section (user still has the chance to cancel operation).
2- tableViewModel:itemAddedForSectionAtIndexPath:item: -This is called when the user taps the Done button and the managed object is finally added to the section.
Hope this helps.