SCSelectionCell
@interface SCSelectionCell : SCLabelCell {
SCDataStore *selectionItemsStore;
SCDataFetchOptions *selectionItemsFetchOptions;
BOOL allowMultipleSelection;
BOOL allowNoSelection;
NSUInteger maximumSelections;
BOOL autoDismissDetailView;
BOOL hideDetailViewNavigationBar;
BOOL allowAddingItems;
BOOL allowDeletingItems;
BOOL allowMovingItems;
BOOL allowEditDetailView;
BOOL displaySelection;
NSString *delimeter;
NSMutableSet *selectedItemsIndexes;
SCTableViewCell *placeholderCell;
SCTableViewCell *addNewItemCell;
}
This class functions as a cell that provides the end-user with an automatically generated detail view of options to choose from, much like the Ringtone selection cell in the iPhone’s sound settings. The selection items are provided in the form of an array of NSStrings, called the items array. ‘SCSelectionCell’ can be configured to allow multiple selection and to allow no selection at all. the bound property of this cell must be of type NSNumber, NSString, or NSMutableSet. If allowMultipleSelection is TRUE, then only NSString and NSMutableSet property types are allowed.
See
SCSelectionSection.-
Undocumented
Declaration
Objective-C
SCDataStore *selectionItemsStore
-
Undocumented
Declaration
Objective-C
SCDataFetchOptions *selectionItemsFetchOptions
-
Undocumented
Declaration
Objective-C
BOOL allowMultipleSelection
-
Undocumented
Declaration
Objective-C
BOOL allowNoSelection
-
Undocumented
Declaration
Objective-C
NSUInteger maximumSelections
-
Undocumented
Declaration
Objective-C
BOOL autoDismissDetailView
-
Undocumented
Declaration
Objective-C
BOOL hideDetailViewNavigationBar
-
Undocumented
Declaration
Objective-C
BOOL allowAddingItems
-
Undocumented
Declaration
Objective-C
BOOL allowDeletingItems
-
Undocumented
Declaration
Objective-C
BOOL allowMovingItems
-
Undocumented
Declaration
Objective-C
BOOL allowEditDetailView
-
Undocumented
Declaration
Objective-C
BOOL displaySelection
-
Undocumented
Declaration
Objective-C
NSString *delimeter
-
Undocumented
Declaration
Objective-C
NSMutableSet *selectedItemsIndexes
-
Undocumented
Declaration
Objective-C
SCTableViewCell *placeholderCell
-
Undocumented
Declaration
Objective-C
SCTableViewCell *addNewItemCell
-
Allocates and returns an initialized SCSelectionCell given cell text, bound object, an NSNumber bound property name, and an array of selection items.
- - parameter: cellText The text that will appear in the cell’s textLabel.
- - parameter: object The cell’s bound object (see SCTableViewCell class overview).
- - parameter: propertyName The cell’s bound property name corresponding to the selected item index. Property must be of an NSNumber type and cannot be a readonly property.
- - parameter: cellItems An array of the items that the user will choose from. All items must be of an NSString type.
Declaration
Objective-C
+ (instancetype)cellWithText:(NSString *)cellText boundObject:(NSObject *)object selectedIndexPropertyName:(NSString *)propertyName items:(NSArray *)cellItems;
-
Allocates and returns an initialized SCSelectionCell given cell text, bound object, a bound property name, an array of selection items, and whether to allow multiple selection.
- - parameter: cellText The text that will appear in the cell’s textLabel.
- - parameter: object The cell’s bound object (see SCTableViewCell class overview).
- - parameter: propertyName The cell’s bound property name corresponding to the selected items indexes set. Property must be of an NSMutableSet type and can be a readonly property.
- - parameter: cellItems An array of the items that the user will choose from. All items must be of an NSString type.
- - parameter: multipleSelection Determines if multiple selection is allowed.
Declaration
Objective-C
+ (instancetype)cellWithText:(NSString *)cellText boundObject:(NSObject *)object selectedIndexesPropertyName:(NSString *)propertyName items:(NSArray *)cellItems allowMultipleSelection:(BOOL)multipleSelection;
-
Allocates and returns an initialized SCSelectionCell given cell text, bound object, an NSString bound property name, and an array of selection items.
- - parameter: cellText The text that will appear in the cell’s textLabel.
- - parameter: object The cell’s bound object (see SCTableViewCell class overview).
- - parameter: propertyName The cell’s bound property name corresponding to the selected item string. Property must be of an NSString type and cannot be a readonly property.
- - parameter: cellItems An array of the items that the user will choose from. All items must be of an NSString type.
Declaration
Objective-C
+ (instancetype)cellWithText:(NSString *)cellText boundObject:(NSObject *)object selectionStringPropertyName:(NSString *)propertyName items:(NSArray *)cellItems;
-
Returns an initialized SCSelectionCell given cell text, bound object, an NSNumber bound property name, and an array of selection items.
- - parameter: cellText The text that will appear in the cell’s textLabel.
- - parameter: object The cell’s bound object (see SCTableViewCell class overview).
- - parameter: propertyName The cell’s bound property name corresponding to the selected item index. Property must be of an NSNumber type and cannot be a readonly property.
- - parameter: cellItems An array of the items that the user will choose from. All items must be of an NSString type.
Declaration
Objective-C
- (instancetype)initWithText:(NSString *)cellText boundObject:(NSObject *)object selectedIndexPropertyName:(NSString *)propertyName items:(NSArray *)cellItems;
-
Returns an initialized SCSelectionCell given cell text, bound object, a bound property name, an array of selection items, and whether to allow multiple selection.
- - parameter: cellText The text that will appear in the cell’s textLabel.
- - parameter: object The cell’s bound object (see SCTableViewCell class overview).
- - parameter: propertyName The cell’s bound property name corresponding to the selected items indexes set. Property must be of an NSMutableSet type and can be a readonly property.
- - parameter: cellItems An array of the items that the user will choose from. All items must be of an NSString type.
- - parameter: multipleSelection Determines if multiple selection is allowed.
Declaration
Objective-C
- (instancetype)initWithText:(NSString *)cellText boundObject:(NSObject *)object selectedIndexesPropertyName:(NSString *)propertyName items:(NSArray *)cellItems allowMultipleSelection:(BOOL)multipleSelection;
-
Returns an initialized SCSelectionCell given cell text, bound object, an NSString bound property name, and an array of selection items.
- - parameter: cellText The text that will appear in the cell’s textLabel.
- - parameter: object The cell’s bound object (see SCTableViewCell class overview).
- - parameter: propertyName The cell’s bound property name corresponding to the selected item string. Property must be of an NSString type and cannot be a readonly property.
- - parameter: cellItems An array of the items that the user will choose from. All items must be of an NSString type.
Declaration
Objective-C
- (instancetype)initWithText:(NSString *)cellText boundObject:(NSObject *)object selectionStringPropertyName:(NSString *)propertyName items:(NSArray *)cellItems;
-
The data store for the selection items.
Declaration
Objective-C
@property (nonatomic, strong) SCDataStore *selectionItemsStore;
-
The fetch options for the selection items.
Declaration
Objective-C
@property (nonatomic, strong) SCDataFetchOptions *selectionItemsFetchOptions;
-
The items stored in selectionItemsStore.
Declaration
Objective-C
@property (nonatomic, strong) NSArray *items;
-
This property reflects the current cell’s selection. You can set this property to define the cell’s selection.
Note
If you have bound this cell to an object or a key, you can define the cell’s selection using either the bound property value or the key value, respectively.Declaration
Objective-C
@property (nonatomic, copy) NSNumber *selectedItemIndex;
-
This property reflects the current cell’s selection(s). You can add index(es) to the set to define the cell’s selection.
Note
If you have bound this cell to an object or a key, you can define the cell’s selection using either the bound property value or the key value, respectively.Declaration
Objective-C
@property (nonatomic, readonly) NSMutableSet *selectedItemsIndexes;
-
If TRUE, the cell allows multiple selection. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL allowMultipleSelection;
-
If TRUE, the cell allows no selection at all. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL allowNoSelection;
-
The maximum number of items that can be selected. Set to zero to allow an infinite number of selections. Default: 0.
- - note: Only applicable when allowMultipleSelection is TRUE.
Declaration
Objective-C
@property (nonatomic) NSUInteger maximumSelections;
-
If TRUE, the detail view is automatically dismissed when an item is selected. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL autoDismissDetailView;
-
If TRUE, the detail view’s navigation bar is hidder. Default: FALSE.
- - note: Only applicable when autoDismissDetailView is TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL hideDetailViewNavigationBar;
-
Allows/disables adding new objects to the items array. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL allowAddingItems;
-
Allows/disables deleting new objects from the items array. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL allowDeletingItems;
-
Allows/disables moving an item from one row to another. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL allowMovingItems;
-
Allows/disables editing detail views for items. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL allowEditDetailView;
-
If TRUE, the cell displays the selected items’ titles inside the cell in a left aligned label. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL displaySelection;
-
The delimeter that separates the titles of the selected items. Default: @“ ,”.
- - note: This property is applicable only if displaySelection is TRUE.
Declaration
Objective-C
@property (nonatomic, copy) NSString *delimeter;
-
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.
Declaration
Objective-C
@property (nonatomic, strong) SCTableViewCell *placeholderCell;
-
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 addButtonItem. Default: nil.
Declaration
Objective-C
@property (nonatomic, strong) SCTableViewCell *addNewItemCell;
-
When TRUE, addNewItemCell will be displayed in Normal Mode. Default: FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL addNewItemCellExistsInNormalMode;
-
When TRUE, addNewItemCell will be displayed in Editing Mode. Default: TRUE.
Declaration
Objective-C
@property (nonatomic) BOOL addNewItemCellExistsInEditingMode;