SCArrayOfObjectsCell Class Reference
Inherits from | SCTableViewCell : UITableViewCell |
Declared in | SCTableViewCell.h |
Overview
This class functions as a cell that, given an array of objects, will generate an SCArrayOfObjectsSection detail view that’s displayed when the cell is tapped.
The cell can also be optionally bound to an object and generate an additional SCObjectSection detail view when the cell is tapped while the table is in edit mode.
Tasks
Creation and Initialization
-
+ cellWithDataStore:
Allocates and returns an initialized SCArrayOfObjectsCell given a data store.
-
+ cellWithItems:itemsDefinition:
Allocates and returns an initialized SCArrayOfObjectsCell given an array of objects and their class definition.
-
– initWithDataStore:
Returns an initialized SCArrayOfObjectsCell given a data store.
-
– initWithItems:itemsDefinition:
Returns an initialized SCArrayOfObjectsCell given an array of objects and their class definition.
Configuration
-
dataStore
The data store that’s used to store and fetch the cell’s objects.
property -
dataFetchOptions
property -
items
The items fetched from the dataStore.
property -
allowAddingItems
propertyAllows/disables adding new objects to the items array. Default: TRUE.
-
allowDeletingItems
Allows/disables deleting new objects from the items array. Default: TRUE.
property -
allowMovingItems
Allows/disables moving objects from one row to another. Default: TRUE.
property -
allowEditDetailView
Allows/disables editing detail views for objects. Default: TRUE.
property -
allowRowSelection
Allows/disables row selection. Default: TRUE.
property -
autoSelectNewItemCell
Allows/disables automatic cell selection of newly created items. Default: FALSE.
property -
displayItemsCountInBadgeView
Allows/disables displaying the number of objects in the cell’s badgeView. Default: TRUE.
property -
detailSectionActions
The set of actions for the cell’s automatically generated detail section.
property
Configuring Special Cells
-
placeholderCell
When set to a valid cell object, ‘placeholderCell’ will be displayed when no items exist in the generated section. As soon as any items are added, this cell automatically disappears. Default: nil.
property -
addNewItemCell
When set to a valid cell object, ‘addNewItemCell’ will be displayed as the last cell of the generated section, and will add a new item to the section whenever it gets tapped by the user. This cell can be used as an alternative to the section’s addButtonItem. Default: nil.
property -
addNewItemCellExistsInNormalMode
When TRUE, addNewItemCell will be displayed in Normal Mode. Default: TRUE.
property -
addNewItemCellExistsInEditingMode
When TRUE, addNewItemCell will be displayed in Editing Mode. Default: TRUE.
property
CoreData Methods
-
+ cellWithEntityDefinition:
Allocates and returns an initialized SCArrayOfObjectsCell given a header title and an entity definition.
-
+ cellWithBoundItemsSet:boundSetEntityDefinition:boundSetOwnsObjects:
Allocates and returns an initialized SCArrayOfObjectsCell given a mutable set of objects.
-
– initWithEntityDefinition:
Returns an initialized SCArrayOfObjectsCell given a header title and an entity definition.
-
– initWithBoundItemsSet:boundSetEntityDefinition:boundSetOwnsObjects:
Returns an initialized SCArrayOfObjectsCell given a mutable set of objects.
Properties
addNewItemCell
When set to a valid cell object, ‘addNewItemCell’ will be displayed as the last cell of the generated section, and will add a new item to the section whenever it gets tapped by the user. This cell can be used as an alternative to the section’s addButtonItem. Default: nil.
@property (nonatomic, strong) SCTableViewCell *addNewItemCell
Declared In
SCTableViewCell.h
addNewItemCellExistsInEditingMode
When TRUE, addNewItemCell will be displayed in Editing Mode. Default: TRUE.
@property (nonatomic, readwrite) BOOL addNewItemCellExistsInEditingMode
Declared In
SCTableViewCell.h
addNewItemCellExistsInNormalMode
When TRUE, addNewItemCell will be displayed in Normal Mode. Default: TRUE.
@property (nonatomic, readwrite) BOOL addNewItemCellExistsInNormalMode
Declared In
SCTableViewCell.h
allowAddingItems
Allows/disables adding new objects to the items array. Default: TRUE.
@property (nonatomic, readwrite) BOOL allowAddingItems
Declared In
SCTableViewCell.h
allowDeletingItems
Allows/disables deleting new objects from the items array. Default: TRUE.
@property (nonatomic, readwrite) BOOL allowDeletingItems
Declared In
SCTableViewCell.h
allowEditDetailView
Allows/disables editing detail views for objects. Default: TRUE.
@property (nonatomic, readwrite) BOOL allowEditDetailView
Declared In
SCTableViewCell.h
allowMovingItems
Allows/disables moving objects from one row to another. Default: TRUE.
@property (nonatomic, readwrite) BOOL allowMovingItems
Declared In
SCTableViewCell.h
allowRowSelection
Allows/disables row selection. Default: TRUE.
@property (nonatomic, readwrite) BOOL allowRowSelection
Declared In
SCTableViewCell.h
autoSelectNewItemCell
Allows/disables automatic cell selection of newly created items. Default: FALSE.
@property (nonatomic, readwrite) BOOL autoSelectNewItemCell
Declared In
SCTableViewCell.h
dataFetchOptions
@property (nonatomic, strong) SCDataFetchOptions *dataFetchOptions
Declared In
SCTableViewCell.h
dataStore
The data store that’s used to store and fetch the cell’s objects.
@property (nonatomic, strong) SCDataStore *dataStore
Declared In
SCTableViewCell.h
detailSectionActions
The set of actions for the cell’s automatically generated detail section.
@property (nonatomic, readonly) SCSectionActions *detailSectionActions
Declared In
SCTableViewCell.h
displayItemsCountInBadgeView
Allows/disables displaying the number of objects in the cell’s badgeView. Default: TRUE.
@property (nonatomic, readwrite) BOOL displayItemsCountInBadgeView
Declared In
SCTableViewCell.h
items
The items fetched from the dataStore.
@property (nonatomic, readonly) NSArray *items
Declared In
SCTableViewCell.h
placeholderCell
When set to a valid cell object, ‘placeholderCell’ will be displayed when no items exist in the generated section. As soon as any items are added, this cell automatically disappears. Default: nil.
@property (nonatomic, strong) SCTableViewCell *placeholderCell
Declared In
SCTableViewCell.h
Class Methods
cellWithBoundItemsSet:boundSetEntityDefinition:boundSetOwnsObjects:
Allocates and returns an initialized SCArrayOfObjectsCell given a mutable set of objects.
+ (id)cellWithBoundItemsSet:(NSMutableSet *)cellItemsSet boundSetEntityDefinition:(SCEntityDefinition *)definition boundSetOwnsObjects:(BOOL)ownsObjects
Parameters
- cellItemsSet
A mutable set of objects that the cell will use to generate its cells.
- definition
The class definition of the entity of the objects in the objects set.
Discussion
Warning: This method should only be used to create a cell with the contents of a Core Data relationship.
Declared In
SCArrayOfObjectsCell+CoreData.h
cellWithDataStore:
Allocates and returns an initialized SCArrayOfObjectsCell given a data store.
+ (id)cellWithDataStore:(SCDataStore *)store
Parameters
- store
The data store containing the cell’s objects.
Declared In
SCTableViewCell.h
cellWithEntityDefinition:
Allocates and returns an initialized SCArrayOfObjectsCell given a header title and an entity definition.
+ (id)cellWithEntityDefinition:(SCEntityDefinition *)definition
Parameters
- definition
The entity definition of the objects in the objects set.
Discussion
Note: This method creates a cell with all the objects that exist in classDefinition’s entity’s managedObjectContext. To create a cell with only a subset of these objects, consider using the other cell initializers.
Declared In
SCArrayOfObjectsCell+CoreData.h
cellWithItems:itemsDefinition:
Allocates and returns an initialized SCArrayOfObjectsCell given an array of objects and their class definition.
+ (id)cellWithItems:(NSMutableArray *)cellItems itemsDefinition:(SCDataDefinition *)definition
Parameters
- cellItems
An array of objects that the cell will use to generate its detail cells.
- definition
The definition of the objects in the objects array. If the array contains more than one type of object, then their respective definitions must be added to the itemsClassDefinitions dictionary after initialization.
Declared In
SCTableViewCell.h
Instance Methods
initWithBoundItemsSet:boundSetEntityDefinition:boundSetOwnsObjects:
Returns an initialized SCArrayOfObjectsCell given a mutable set of objects.
- (id)initWithBoundItemsSet:(NSMutableSet *)cellItemsSet boundSetEntityDefinition:(SCEntityDefinition *)definition boundSetOwnsObjects:(BOOL)ownsObjects
Parameters
- cellItemsSet
A mutable set of objects that the cell will use to generate its cells.
- definition
The class definition of the entity of the objects in the objects set.
Discussion
Warning: This method should only be used to create a cell with the contents of a Core Data relationship.
Declared In
SCArrayOfObjectsCell+CoreData.h
initWithDataStore:
Returns an initialized SCArrayOfObjectsCell given a data store.
- (id)initWithDataStore:(SCDataStore *)store
Parameters
- store
The data store containing the cell’s objects.
Declared In
SCTableViewCell.h
initWithEntityDefinition:
Returns an initialized SCArrayOfObjectsCell given a header title and an entity definition.
- (id)initWithEntityDefinition:(SCEntityDefinition *)definition
Parameters
- definition
The entity definition of the objects in the objects set.
Discussion
Note: This method creates a cell with all the objects that exist in classDefinition’s entity’s managedObjectContext. To create a cell with only a subset of these objects, consider using the other cell initializers.
Declared In
SCArrayOfObjectsCell+CoreData.h
initWithItems:itemsDefinition:
Returns an initialized SCArrayOfObjectsCell given an array of objects and their class definition.
- (id)initWithItems:(NSMutableArray *)cellItems itemsDefinition:(SCDataDefinition *)definition
Parameters
- cellItems
An array of objects that the cell will use to generate its detail cells.
- classDefinition
The class definition of the class or entity of the objects in the objects array. If the array contains more than one type of object, then their respective class definitions must be added to the itemsClassDefinitions dictionary after initialization.
Declared In
SCTableViewCell.h