SCObjectSelectionCell Class Reference
Inherits from | SCSelectionCell : SCLabelCell : SCControlCell : SCCustomCell : SCTableViewCell : UITableViewCell |
Declared in | SCTableViewCell.h |
Overview
This class functions as a cell that provides the end-user with an automatically generated detail view of objects to choose from.
The selection items are provided in the form of an array of NSObjects, called the items array. ‘SCObjectSelectionCell’ can be configured to allow multiple selection and to allow no selection at all. If allow multiple selection is disabled, then the bound property name of this cell must be of type NSObject, otherwise it must be of type NSMutableSet.
Tasks
Creation and Initialization
-
+ cellWithText:boundObject:selectedObjectPropertyName:selectionItemsStore:
Allocates and returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and a selection items store.
-
+ cellWithText:boundObject:selectedObjectPropertyName:selectionItems:itemsDefintion:
Allocates and returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and an array of selection objects.
-
– initWithText:boundObject:selectedObjectPropertyName:selectionItemsStore:
Returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and a selection items store.
-
– initWithText:boundObject:selectedObjectPropertyName:selectionItems:itemsDefintion:
Returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and an array of selection objects.
Configuration
-
intermediateEntityDefinition
Set this to the definition of the intermediate entity between the bound object’s definition and the objectsDefinition. This is useful in complex many-to-many relationships where you have created an intermediate entity between you main two entities. Default: nil.
property
Properties
intermediateEntityDefinition
Set this to the definition of the intermediate entity between the bound object’s definition and the objectsDefinition. This is useful in complex many-to-many relationships where you have created an intermediate entity between you main two entities. Default: nil.
@property (nonatomic, strong) SCDataDefinition *intermediateEntityDefinition
Declared In
SCTableViewCell.h
Class Methods
cellWithText:boundObject:selectedObjectPropertyName:selectionItems:itemsDefintion:
Allocates and returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and an array of selection objects.
+ (id)cellWithText:(NSString *)cellText boundObject:(NSObject *)object selectedObjectPropertyName:(NSString *)propertyName selectionItems:(NSArray *)items itemsDefintion:(SCDataDefinition *)definition
Parameters
- cellText
The text that will appear in the cell’s textLabel.
- object
The cell’s bound object (see SCTableViewCell class overview).
- propertyName
The cell’s bound property name corresponding to the object selection. If multiple selection is allowed, then property must be of an NSMutableSet type, otherwise, property must be of type NSObject and cannot be a readonly property.
- items
An array of the objects that the user will choose from. All objects must be of an NSObject type and must be instances of the same class.
- itemsDefinition
The definition of the selection objects.
Declared In
SCTableViewCell.h
cellWithText:boundObject:selectedObjectPropertyName:selectionItemsStore:
Allocates and returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and a selection items store.
+ (id)cellWithText:(NSString *)cellText boundObject:(NSObject *)object selectedObjectPropertyName:(NSString *)propertyName selectionItemsStore:(SCDataStore *)store
Parameters
- cellText
The text that will appear in the cell’s textLabel.
- object
The cell’s bound object (see SCTableViewCell class overview).
- propertyName
The cell’s bound property name corresponding to the object selection. If multiple selection is allowed, then property must be of an NSMutableSet type, otherwise, property must be of type NSObject and cannot be a readonly property.
- store
The store containing the selection objects.
Declared In
SCTableViewCell.h
Instance Methods
initWithText:boundObject:selectedObjectPropertyName:selectionItems:itemsDefintion:
Returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and an array of selection objects.
- (id)initWithText:(NSString *)cellText boundObject:(NSObject *)object selectedObjectPropertyName:(NSString *)propertyName selectionItems:(NSArray *)items itemsDefintion:(SCDataDefinition *)definition
Parameters
- cellText
The text that will appear in the cell’s textLabel.
- object
The cell’s bound object (see SCTableViewCell class overview).
- propertyName
The cell’s bound property name corresponding to the object selection. If multiple selection is allowed, then property must be of an NSMutableSet type, otherwise, property must be of type NSObject and cannot be a readonly property.
- objectsDefinition
The definition of the selection objects.
- objects
An array of the objects that the user will choose from. All objects must be of an NSObject type and must be instances of the same class.
Declared In
SCTableViewCell.h
initWithText:boundObject:selectedObjectPropertyName:selectionItemsStore:
Returns an initialized SCObjectSelectionCell given cell text, bound object, a bound property name, and a selection items store.
- (id)initWithText:(NSString *)cellText boundObject:(NSObject *)object selectedObjectPropertyName:(NSString *)propertyName selectionItemsStore:(SCDataStore *)store
Parameters
- cellText
The text that will appear in the cell’s textLabel.
- object
The cell’s bound object (see SCTableViewCell class overview).
- propertyName
The cell’s bound property name corresponding to the object selection. If multiple selection is allowed, then property must be of an NSMutableSet type, otherwise, property must be of type NSObject and cannot be a readonly property.
- store
The store containing the selection objects.
Declared In
SCTableViewCell.h