SCTableViewSection
@interface SCTableViewSection : NSObject {
SCTableViewModel *_ownerTableViewModel;
NSObject *boundObject;
SCDataStore *boundObjectStore;
NSString *boundPropertyName;
BOOL commitChangesLive;
BOOL commitCellChangesLive;
NSString *headerTitle;
CGFloat headerHeight;
UIView *headerView;
NSString *footerTitle;
CGFloat footerHeight;
UIView *footerView;
SCSectionActions *sectionActions;
NSMutableArray *cells;
SCCellActions *cellActions;
NSArray *cellsImageViews;
SCExpandCollapseCell *expandCollapseCell;
SCDetailViewControllerOptions *detailViewControllerOptions;
SCDetailViewControllerOptions *newItemDetailViewControllerOptions;
NSString *themeStyle;
NSString *firstCellThemeStyle;
NSString *evenCellsThemeStyle;
NSString *oddCellsThemeStyle;
NSString *lastCellThemeStyle;
}
This class functions as a section for SCTableViewModel. Every ‘SCTableViewSection’ can contain any number of SCTableViewCell(s).
-
Unavailable
Undocumented
Declaration
Objective-C
__weak SCTableViewModel *_ownerTableViewModel
-
Undocumented
Declaration
Objective-C
NSObject *boundObject
-
Undocumented
Declaration
Objective-C
SCDataStore *boundObjectStore
-
Undocumented
Declaration
Objective-C
NSString *boundPropertyName
-
Undocumented
Declaration
Objective-C
BOOL commitChangesLive
-
Undocumented
Declaration
Objective-C
BOOL commitCellChangesLive
-
Undocumented
Declaration
Objective-C
NSString *headerTitle
-
Undocumented
Declaration
Objective-C
CGFloat headerHeight
-
Undocumented
Declaration
Objective-C
UIView *headerView
-
Undocumented
Declaration
Objective-C
NSString *footerTitle
-
Undocumented
Declaration
Objective-C
CGFloat footerHeight
-
Undocumented
Declaration
Objective-C
UIView *footerView
-
Undocumented
Declaration
Objective-C
SCSectionActions *sectionActions
-
Undocumented
Declaration
Objective-C
NSMutableArray *cells
-
Undocumented
Declaration
Objective-C
SCCellActions *cellActions
-
Undocumented
Declaration
Objective-C
NSArray *cellsImageViews
-
Undocumented
Declaration
Objective-C
SCExpandCollapseCell *expandCollapseCell
-
Undocumented
Declaration
Objective-C
SCDetailViewControllerOptions *detailViewControllerOptions
-
Undocumented
Declaration
Objective-C
SCDetailViewControllerOptions *newItemDetailViewControllerOptions
-
Undocumented
Declaration
Objective-C
NSString *themeStyle
-
Undocumented
Declaration
Objective-C
NSString *firstCellThemeStyle
-
Undocumented
Declaration
Objective-C
NSString *evenCellsThemeStyle
-
Undocumented
Declaration
Objective-C
NSString *oddCellsThemeStyle
-
Undocumented
Declaration
Objective-C
NSString *lastCellThemeStyle
-
Allocates and returns an initialized SCTableViewSection.
Declaration
Objective-C
+ (instancetype)section;
-
Allocates and returns an initialized SCTableViewSection given a header title. *
- - parameter: sectionHeaderTitle A header title for the section.
Declaration
Objective-C
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle;
-
Allocates and returns an initialized SCTableViewSection given a header and a footer title. *
- - parameter: sectionHeaderTitle A header title for the section.
- - parameter: sectionFooterTitle A footer title for the section.
Declaration
Objective-C
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle footerTitle:(NSString *)sectionFooterTitle;
-
Returns an initialized SCTableViewSection given a header title. *
- - parameter: sectionHeaderTitle A header title for the section.
Declaration
Objective-C
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle;
-
Returns an initialized SCTableViewSection given a header and a footer title. *
- - parameter: sectionHeaderTitle A header title for the section.
- - parameter: sectionFooterTitle A footer title for the section.
Declaration
Objective-C
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle footerTitle:(NSString *)sectionFooterTitle;
-
The owner table view model of the section. *
- - warning: This property gets set automatically by the section’s owner, you should never set this property manually
Declaration
Objective-C
@property (nonatomic, weak) SCTableViewModel *ownerTableViewModel;
-
The section header title.
Declaration
Objective-C
@property (nonatomic, copy) NSString *headerTitle;
-
The section header height.
Declaration
Objective-C
@property (nonatomic) CGFloat headerHeight;
-
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.
Declaration
Objective-C
@property (nonatomic, strong) UIView *headerView;
-
The section footer title.
Declaration
Objective-C
@property (nonatomic, copy) NSString *footerTitle;
-
The section footer height.
Declaration
Objective-C
@property (nonatomic) CGFloat footerHeight;
-
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.
Declaration
Objective-C
@property (nonatomic, strong) UIView *footerView;
-
The set of section action blocks.
Declaration
Objective-C
@property (nonatomic, readonly) SCSectionActions *sectionActions;
-
The set of cell action blocks that get applied to all the section’s cells.
Note
Cell actions defined in the section’s individual cells will override any actions set here.Declaration
Objective-C
@property (nonatomic, readonly) SCCellActions *cellActions;
-
Set this property to an array of UIImageView objects to be set to each of the section’s cells.
Declaration
Objective-C
@property (nonatomic, strong) NSArray *cellsImageViews;
-
Options for the generated detail view controller (only applicable to subclasses with a detail view controller).
Declaration
Objective-C
@property (nonatomic, readonly) SCDetailViewControllerOptions *detailViewControllerOptions;
-
Options for the generated detail view controller for new items (only applicable to subclasses with a detail view controller).
Declaration
Objective-C
@property (nonatomic, readonly) SCDetailViewControllerOptions *newItemDetailViewControllerOptions;
-
When set to a valid SCExpandCollapseCell, the cell will control if the section’s content is expanded or collapsed. *
- - note: Setting this property automatically adds expandCollapseCell to the section at index 0, making it the first cell.
Declaration
Objective-C
@property (nonatomic, strong) SCExpandCollapseCell *expandCollapseCell;
-
The theme style of the section.
Declaration
Objective-C
@property (nonatomic, copy) NSString *themeStyle;
-
The theme style of the first cell in the section.
Declaration
Objective-C
@property (nonatomic, copy) NSString *firstCellThemeStyle;
-
The theme style of the even cells in the section.
Declaration
Objective-C
@property (nonatomic, copy) NSString *evenCellsThemeStyle;
-
The theme style of the odd cells in the section.
Declaration
Objective-C
@property (nonatomic, copy) NSString *oddCellsThemeStyle;
-
The theme style of the last cell in the section.
Declaration
Objective-C
@property (nonatomic, copy) NSString *lastCellThemeStyle;
-
The number of cells in the section.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger cellCount;
-
Adds a new cell to the section.
- - parameter: cell Must be a valid non nil SCTableViewCell.
Declaration
Objective-C
- (void)addCell:(SCTableViewCell *)cell;
-
Inserts a new cell into the section at the specified index.
- - parameter: cell Must be a valid non nil SCTableViewCell.
- - parameter: index Must be less than the total number of cells.
Declaration
Objective-C
- (void)insertCell:(SCTableViewCell *)cell atIndex:(NSUInteger)index;
-
Returns the cell at the specified index.
- - parameter: index Must be less than the total number of cells.
Declaration
Objective-C
- (SCTableViewCell *)cellAtIndex:(NSUInteger)index;
-
Removes the cell at the specified index.
- - parameter: index Must be less than the total number of cells.
Declaration
Objective-C
- (void)removeCellAtIndex:(NSUInteger)index;
-
Removes the cell identical to the given cell.
- - parameter: cell That cell to be matched against.
Declaration
Objective-C
- (void)removeCellIdenticalTo:(SCTableViewCell *)cell;
-
Removes all cells in section.
Declaration
Objective-C
- (void)removeAllCells;
-
Returns the index of the specified cell.
- - parameter: cell Must be a valid non nil SCTableViewCell.
- - returns: If cell is not found, method returns NSNotFound.
Declaration
Objective-C
- (NSUInteger)indexForCell:(SCTableViewCell *)cell;
-
This property is TRUE if all the section cells’ values are valid, otherwise it’s FALSE.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL valuesAreValid;
-
This property is TRUE if any of the section’s cells need to be commited, otherwise it’s FALSE.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL needsCommit;
-
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.
Declaration
Objective-C
@property (nonatomic) BOOL commitCellChangesLive;
-
Commits value changes for all cells in section. This method needs to be called only if the commitCellChangesLive property is FALSE.
Declaration
Objective-C
- (void)commitCellChanges;
-
Overrides optimization and sets all cells as needing to be committed.
Declaration
Objective-C
- (void)invalidateCellCommits;
-
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).
Declaration
Objective-C
- (void)reloadBoundValues;
-
Provides subclasses with the framework to bind an SCTableViewSection to an NSObject
Declaration
Objective-C
@property (nonatomic, strong) NSObject *boundObject;
-
The data store of the cell’s bound object.
Declaration
Objective-C
@property (nonatomic, strong) SCDataStore *boundObjectStore;
-
Provides subclasses with the framework to bind an SCTableViewSection to an NSObject
Declaration
Objective-C
@property (nonatomic, readonly) NSString *boundPropertyName;
-
Provides subclasses with the framework to bind an SCTableViewSection to a value
Declaration
Objective-C
@property (nonatomic, strong) NSObject *boundValue;
-
Called internally by the framework to determine the cell height at the specified indexPath.
Declaration
Objective-C
- (CGFloat)heightForCellAtIndexPath:(NSIndexPath *)indexPath;
-
Method called internally whenever the owner table view’s editing mode is about to change.
Declaration
Objective-C
- (void)editingModeWillChange;
-
Method called internally whenever the owner table view’s editing mode has changed.
Declaration
Objective-C
- (void)editingModeDidChange;
-
Method should be overridden by subclasses to support property attributes.
The method should be able to set the subclass’ specific attributes to its corresponding SCPropertyAttributes subclass.
Declaration
Objective-C
- (void)setAttributesTo:(SCPropertyAttributes *)attributes;
-
Internal method that sets the section’s expanded state. Never set this property to expand/collapse the section. Use the expandCollapseCell property instead.
Declaration
Objective-C
- (void)setExpanded:(BOOL)expanded;
-
Internal method. *
Declaration
Objective-C
- (UIViewController *)generatedDetailViewControllerForCellAtIndexPath: (NSIndexPath *)indexPath;
-
Called internally to rollback to initial cell bound values when their bound object was first assigned.
Declaration
Objective-C
- (void)rollbackToInitialCellValues;