SCArrayOfObjectsCell

@interface SCArrayOfObjectsCell : SCCustomCell {
  SCDataStore *dataStore;
  SCDataFetchOptions *dataFetchOptions;
  BOOL allowAddingItems;
  BOOL allowDeletingItems;
  BOOL allowMovingItems;
  BOOL allowEditDetailView;
  BOOL allowRowSelection;
  BOOL autoSelectNewItemCell;
  BOOL displayItemsCountInBadgeView;
  SCTableViewCell *placeholderCell;
  SCTableViewCell *addNewItemCell;
  BOOL addNewItemCellExistsInNormalMode;
  BOOL addNewItemCellExistsInEditingMode;
  SCSectionActions *_detailSectionActions;
}

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.

See

SCObjectCell, SCObjectSection, SCArrayOfObjectsSection.

Creation and Initialization

  • Allocates and returns an initialized SCArrayOfObjectsCell given a data store. *

    • - parameter: store The data store containing the cell’s objects.

    Declaration

    Objective-C

    + (instancetype)cellWithDataStore:(SCDataStore *)store;
  • Allocates and returns an initialized SCArrayOfObjectsCell given an array of objects and their class definition. *

    • - parameter: cellItems An array of objects that the cell will use to generate its detail cells.
    • - parameter: 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.

    Declaration

    Objective-C

    + (instancetype)cellWithItems:(NSMutableArray *)cellItems
                  itemsDefinition:(SCDataDefinition *)definition;
  • Returns an initialized SCArrayOfObjectsCell given a data store. *

    • - parameter: store The data store containing the cell’s objects.

    Declaration

    Objective-C

    - (instancetype)initWithDataStore:(SCDataStore *)store;
  • Returns an initialized SCArrayOfObjectsCell given an array of objects and their class definition. *

    • - parameter: cellItems An array of objects that the cell will use to generate its detail cells.
    • - parameter: definition 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.

    Declaration

    Objective-C

    - (instancetype)initWithItems:(NSMutableArray *)cellItems
                  itemsDefinition:(SCDataDefinition *)definition;

Configuration

Configuring Special Cells

Creation and Initialization

  • Allocates and returns an initialized SCArrayOfObjectsCell given a header title and an entity definition.

    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.

    Declaration

    Objective-C

    + (instancetype)cellWithEntityDefinition:(SCEntityDefinition *)definition;

    Parameters

    definition

    The entity definition of the objects in the objects set.

  • Allocates and returns an initialized SCArrayOfObjectsCell given a mutable set of objects.

    Warning

    This method should only be used to create a cell with the contents of a Core Data relationship.

    Declaration

    Objective-C

    + (instancetype)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.

  • Returns an initialized SCArrayOfObjectsCell given a header title and an entity definition.

    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.

    Declaration

    Objective-C

    - (instancetype)initWithEntityDefinition:(SCEntityDefinition *)definition;

    Parameters

    definition

    The entity definition of the objects in the objects set.

  • Returns an initialized SCArrayOfObjectsCell given a mutable set of objects.

    Warning

    This method should only be used to create a cell with the contents of a Core Data relationship.

    Declaration

    Objective-C

    - (instancetype)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.