Sure. You can fully customize the auto generated cells of any class definition using two main methods:
1- All the really common customizations are provided through the attributes property of SCPropertyDefinition. Each property definition type has a corresponding attributes class. For example, a property definition of type SCPropertyTypeSelection should be assigned to attributes of type
SCSelectionAttributes, which helps in defining the selection items in addition to how they're selected. In your case, setting an
SCDateAttributes to your property definition does not cover what you want to customize, and thus you have two use the second method mentioned below.
2- Almost any other customization can be done using the
SCTableViewCellDelegate methods willConfigureCell: and willDisplayCell:. For these delegate methods to get called, you need to set the automatically generated cells' delegate using your class definition's uiElementDelegate property. Here is some sample code that illustrates how to achieve what you want:
...
SCClassDefinition *apptClassDef = ...; // Create the class definition normally here
apptClassDef.uiElementDelegate = self;
// Your normal property definition here
SCPropertyDefinition *apptDatePropertyDef = [apptClassDef propertyDefinitionWithName:@"apptDate"];
apptDatePropertyDef.type = SCPropertyTypeDate;
apptDatePropertyDef.required = TRUE;
apptDatePropertyDef.title = @"Date";
...
Then implement the willConfigureCell: method
// Don't forget to conform to the SCTableViewCellDelegate protocol
// for this method to get fired
- (void)willConfigureCell:(SCTableViewCell *)cell
{
if([cell isKindOfClass:[SCDateCell class]])
{
[(SCDateCell *)cell datePicker].minuteInterval = 15;
}
}
Hope this helps