Inherits from SCTableViewSection : NSObject
Declared in SCTableViewSection.h

Overview

This class functions as an SCTableViewModel section that is able to automatically generate its cells from a given bound object’s properties. If the bound object is given without an extended class definition (SCClassDefinition), then cells will only be generated for properties of type NSString and NSNumber, and will be either of type SCTextFieldCell or SCNumericTextFieldCell, respectively. If an SCClassDefinition is provided for the bound object, a full fledged section of cells will be generated.

@note: For your convenience, the tag property of each generated cell will have a number corresponding to the index of it’s corresponding property in bound object.

Properties

propertyGroup

The section’s bound object’s group of properties that are rendered into cells.

@property (nonatomic, strong) SCPropertyGroup *propertyGroup

Declared In

SCTableViewSection.h

Class Methods

sectionWithHeaderTitle:boundObject:

Allocates and returns an initialized ‘SCObjectSection’ given a header title and a bound object.

+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

Declared In

SCTableViewSection.h

sectionWithHeaderTitle:boundObject:boundObjectDefinition:

Allocates and returns an initialized ‘SCObjectSection’ given a header title, a bound object and its extended class definition.

+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object boundObjectDefinition:(SCDataDefinition *)definition

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

definition

The definition for the object.

Declared In

SCTableViewSection.h

sectionWithHeaderTitle:boundObject:boundObjectDefinition:propertyGroup:

Allocates and returns an initialized ‘SCObjectSection’ given a header title, a bound object and its extended class definition along with a property group.

+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object boundObjectDefinition:(SCDataDefinition *)definition propertyGroup:(SCPropertyGroup *)group

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

definition

The definition for the object.

group

Limits the generated properties to the ones in the property group only.

Declared In

SCTableViewSection.h

sectionWithHeaderTitle:boundObject:boundObjectStore:propertyGroup:

Allocates and returns an initialized ‘SCObjectSection’ given a header title, a bound object and its data store along with a property group.

+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object boundObjectStore:(SCDataStore *)store propertyGroup:(SCPropertyGroup *)group

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

group

Limits the generated properties to the ones in the property group only.

definition

The definition for the object.

Declared In

SCTableViewSection.h

Instance Methods

cellForPropertyName:

Returns the cell associated with the given bound object's property name.
- (SCTableViewCell *)cellForPropertyName:(NSString *)propertyName

Parameters

propertyName

The bound object’s property name.

Return Value

Returns nil if no cell have been generated for the given property name, or if the property name does not exist within the bound object.

Declared In

SCTableViewSection.h

configureCell:forPropertyDefinition:inEditingMode:

Configures the cell for the given property definition.

- (void)configureCell:(SCTableViewCell *)cell forPropertyDefinition:(SCPropertyDefinition *)propertyDefinition inEditingMode:(BOOL)editing

Declared In

SCTableViewSection.h

generateCellsForEditingState:

Generates cells based on boundObjectClassDefinition and the given editing state.

- (void)generateCellsForEditingState:(BOOL)editing

Declared In

SCTableViewSection.h

initWithHeaderTitle:boundObject:

Returns an initialized ‘SCObjectSection’ given a header title and a bound object.

- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

Declared In

SCTableViewSection.h

initWithHeaderTitle:boundObject:boundObjectDefinition:

Returns an initialized ‘SCObjectSection’ given a header title, a bound object and its extended class definition.

- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object boundObjectDefinition:(SCDataDefinition *)definition

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

definition

The definition for the object.

Declared In

SCTableViewSection.h

initWithHeaderTitle:boundObject:boundObjectDefinition:propertyGroup:

Returns an initialized ‘SCObjectSection’ given a header title, a bound object and its extended class definition along with a property group.

- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object boundObjectDefinition:(SCDataDefinition *)definition propertyGroup:(SCPropertyGroup *)group

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

definition

The definition for the object.

group

Limits the generated properties to the ones in the property group only.

Declared In

SCTableViewSection.h

initWithHeaderTitle:boundObject:boundObjectStore:propertyGroup:

Returns an initialized ‘SCObjectSection’ given a header title, a bound object and its data store along with a property group.

- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle boundObject:(NSObject *)object boundObjectStore:(SCDataStore *)store propertyGroup:(SCPropertyGroup *)group

Parameters

sectionHeaderTitle

A header title for the section.

object

The object that ‘SCObjectSection’ will use to generate its cells.

group

Limits the generated properties to the ones in the property group only.

definition

The definition for the object.

Declared In

SCTableViewSection.h

reloadCellsIfNeeded

Method called internally by framework to reload cells values, if needed.

- (void)reloadCellsIfNeeded

Declared In

SCTableViewSection.h

rollbackToInitialCellValues

Called internally to rollback to initial cell bound values when their bound object was first assigned.

- (void)rollbackToInitialCellValues

Declared In

SCTableViewSection.h