Inherits from NSObject
Declared in SCTableViewSection.h

Overview

This class functions as a section for SCTableViewModel. Every ‘SCTableViewSection’ can contain any number of SCTableViewCell(s).

Tasks

Creation and Initialization

Configuration

Configuring Special Cells

Configuring Theme Styles

Managing Cells

Managing Cell Values

Internal Properties & Methods (should only be used by the framework or when subclassing)

Properties

boundObject

Provides subclasses with the framework to bind an SCTableViewSection to an NSObject

@property (nonatomic, strong) NSObject *boundObject

Declared In

SCTableViewSection.h

boundObjectStore

The data store of the cell’s bound object.

@property (nonatomic, strong) SCDataStore *boundObjectStore

Declared In

SCTableViewSection.h

boundPropertyName

Provides subclasses with the framework to bind an SCTableViewSection to an NSObject

@property (nonatomic, readonly) NSString *boundPropertyName

Declared In

SCTableViewSection.h

boundValue

Provides subclasses with the framework to bind an SCTableViewSection to a value

@property (nonatomic, strong) NSObject *boundValue

Declared In

SCTableViewSection.h

cellActions

The set of cell action blocks that get applied to all the section’s cells.

@property (nonatomic, readonly) SCCellActions *cellActions

Discussion

Note: Cell actions defined in the section’s individual cells will override any actions set here.

Declared In

SCTableViewSection.h

cellCount

The number of cells in the section.

@property (nonatomic, readonly) NSUInteger cellCount

Declared In

SCTableViewSection.h

cellsImageViews

Set this property to an array of UIImageView objects to be set to each of the section’s cells.

@property (nonatomic, strong) NSArray *cellsImageViews

Declared In

SCTableViewSection.h

commitCellChangesLive

Set this property to TRUE for the section cells to commit their values as soon as they are changed. If this value is FALSE, the user must explicitly call commitCellChanges for the cells to commit their value changes. Default: TRUE.

@property (nonatomic, readwrite) BOOL commitCellChangesLive

Declared In

SCTableViewSection.h

detailViewControllerOptions

Options for the generated detail view controller (only applicable to subclasses with a detail view controller).

@property (nonatomic, readonly) SCDetailViewControllerOptions *detailViewControllerOptions

Declared In

SCTableViewSection.h

evenCellsThemeStyle

The theme style of the even cells in the section.

@property (nonatomic, copy) NSString *evenCellsThemeStyle

Declared In

SCTableViewSection.h

expandCollapseCell

When set to a valid SCExpandCollapseCell, the cell will control if the section’s content is expanded or collapsed.

@property (nonatomic, strong) SCExpandCollapseCell *expandCollapseCell

Discussion

Note: Setting this property automatically adds expandCollapseCell to the section at index 0, making it the first cell.

Declared In

SCTableViewSection.h

firstCellThemeStyle

The theme style of the first cell in the section.

@property (nonatomic, copy) NSString *firstCellThemeStyle

Declared In

SCTableViewSection.h

footerHeight

The section footer height.

@property (nonatomic) CGFloat footerHeight

Declared In

SCTableViewSection.h

footerTitle

The section footer title.

@property (nonatomic, copy) NSString *footerTitle

Declared In

SCTableViewSection.h

footerView

The section footer view. This can be any subclass of UIView (e.g. UILabel or UIImageView). The section automatically adjusts the height of its footer to accommodate this view.

@property (nonatomic, strong) UIView *footerView

Declared In

SCTableViewSection.h

headerHeight

The section header height.

@property (nonatomic) CGFloat headerHeight

Declared In

SCTableViewSection.h

headerTitle

The section header title.

@property (nonatomic, copy) NSString *headerTitle

Declared In

SCTableViewSection.h

headerView

The section header view. This can be any subclass of UIView (e.g. UILabel or UIImageView). The section automatically adjusts the height of its header to accommodate this view.

@property (nonatomic, strong) UIView *headerView

Declared In

SCTableViewSection.h

lastCellThemeStyle

The theme style of the last cell in the section.

@property (nonatomic, copy) NSString *lastCellThemeStyle

Declared In

SCTableViewSection.h

needsCommit

This property is TRUE if any of the section's cells need to be commited, otherwise it's FALSE. 
@property (nonatomic, readonly) BOOL needsCommit

Declared In

SCTableViewSection.h

newItemDetailViewControllerOptions

Options for the generated detail view controller for new items (only applicable to subclasses with a detail view controller).

@property (nonatomic, readonly) SCDetailViewControllerOptions *newItemDetailViewControllerOptions

Declared In

SCTableViewSection.h

oddCellsThemeStyle

The theme style of the odd cells in the section.

@property (nonatomic, copy) NSString *oddCellsThemeStyle

Declared In

SCTableViewSection.h

ownerTableViewModel

The owner table view model of the section.

@property (nonatomic, weak) SCTableViewModel *ownerTableViewModel

Discussion

Warning: This property gets set automatically by the section’s owner, you should never set this property manually

Declared In

SCTableViewSection.h

sectionActions

The set of section action blocks.

@property (nonatomic, readonly) SCSectionActions *sectionActions

Declared In

SCTableViewSection.h

themeStyle

The theme style of the section.

@property (nonatomic, copy) NSString *themeStyle

Declared In

SCTableViewSection.h

valuesAreValid

This property is TRUE if all the section cells' values are valid, otherwise it's FALSE. 
@property (nonatomic, readonly) BOOL valuesAreValid

Declared In

SCTableViewSection.h

Class Methods

section

Allocates and returns an initialized SCTableViewSection.

+ (instancetype)section

Declared In

SCTableViewSection.h

sectionWithHeaderTitle:

Allocates and returns an initialized SCTableViewSection given a header title.

+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle

Parameters

sectionHeaderTitle

A header title for the section.

Declared In

SCTableViewSection.h

sectionWithHeaderTitle:footerTitle:

Allocates and returns an initialized SCTableViewSection given a header and a footer title.

+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle footerTitle:(NSString *)sectionFooterTitle

Parameters

sectionHeaderTitle

A header title for the section.

sectionFooterTitle

A footer title for the section.

Declared In

SCTableViewSection.h

Instance Methods

addCell:

Adds a new cell to the section.

- (void)addCell:(SCTableViewCell *)cell

Parameters

cell

Must be a valid non nil SCTableViewCell.

Declared In

SCTableViewSection.h

cellAtIndex:

Returns the cell at the specified index.

- (SCTableViewCell *)cellAtIndex:(NSUInteger)index

Parameters

index

Must be less than the total number of cells.

Declared In

SCTableViewSection.h

commitCellChanges

Commits value changes for all cells in section. This method needs to be called only if the commitCellChangesLive property is FALSE.

- (void)commitCellChanges

Declared In

SCTableViewSection.h

editingModeDidChange

Method called internally whenever the owner table view’s editing mode has changed.

- (void)editingModeDidChange

Declared In

SCTableViewSection.h

editingModeWillChange

Method called internally whenever the owner table view’s editing mode is about to change.

- (void)editingModeWillChange

Declared In

SCTableViewSection.h

generatedDetailViewControllerForCellAtIndexPath:

Internal method. *

- (UIViewController *)generatedDetailViewControllerForCellAtIndexPath:(NSIndexPath *)indexPath

Declared In

SCTableViewSection.h

heightForCellAtIndexPath:

Called internally by the framework to determine the cell height at the specified indexPath.

- (CGFloat)heightForCellAtIndexPath:(NSIndexPath *)indexPath

Declared In

SCTableViewSection.h

indexForCell:

Returns the index of the specified cell.

- (NSUInteger)indexForCell:(SCTableViewCell *)cell

Parameters

cell

Must be a valid non nil SCTableViewCell.

Return Value

If cell is not found, method returns NSNotFound.

Declared In

SCTableViewSection.h

initWithHeaderTitle:

Returns an initialized SCTableViewSection given a header title.

- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle

Parameters

sectionHeaderTitle

A header title for the section.

Declared In

SCTableViewSection.h

initWithHeaderTitle:footerTitle:

Returns an initialized SCTableViewSection given a header and a footer title.

- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle footerTitle:(NSString *)sectionFooterTitle

Parameters

sectionHeaderTitle

A header title for the section.

sectionFooterTitle

A footer title for the section.

Declared In

SCTableViewSection.h

insertCell:atIndex:

Inserts a new cell into the section at the specified index.

- (void)insertCell:(SCTableViewCell *)cell atIndex:(NSUInteger)index

Parameters

cell

Must be a valid non nil SCTableViewCell.

index

Must be less than the total number of cells.

Declared In

SCTableViewSection.h

invalidateCellCommits

Overrides optimization and sets all cells as needing to be committed.

- (void)invalidateCellCommits

Declared In

SCTableViewSection.h

reloadBoundValues

Reload’s the section’s bound values in case the associated bound objects or keys valuea has changed by means other than the cells themselves (e.g. external custom code).

- (void)reloadBoundValues

Declared In

SCTableViewSection.h

removeAllCells

Removes all cells in section.

- (void)removeAllCells

Declared In

SCTableViewSection.h

removeCellAtIndex:

Removes the cell at the specified index.

- (void)removeCellAtIndex:(NSUInteger)index

Parameters

index

Must be less than the total number of cells.

Declared In

SCTableViewSection.h

removeCellIdenticalTo:

Removes the cell identical to the given cell. @param .

- (void)removeCellIdenticalTo:(SCTableViewCell *)cell

Declared In

SCTableViewSection.h

setAttributesTo:

Method should be overridden by subclasses to support property attributes.

- (void)setAttributesTo:(SCPropertyAttributes *)attributes

Discussion

The method should be able to set the subclass' specific attributes to its corresponding SCPropertyAttributes subclass.

Declared In

SCTableViewSection.h

setDetailViewControllerOptions:

Method called internally.

- (void)setDetailViewControllerOptions:(SCDetailViewControllerOptions *)options

Declared In

SCTableViewSection.h

setExpanded:

Internal method that sets the section’s expanded state. Never set this property to expand/collapse the section. Use the expandCollapseCell property instead.

- (void)setExpanded:(BOOL)expanded

Declared In

SCTableViewSection.h

setNewItemDetailViewControllerOptions:

Method called internally.

- (void)setNewItemDetailViewControllerOptions:(SCDetailViewControllerOptions *)options

Declared In

SCTableViewSection.h