SCObjectSelectionSection

@interface SCObjectSelectionSection : SCArrayOfObjectsSection {
  NSIndexPath *lastSelectedRowIndexPath;
  NSMutableSet *selectedItemsIndexes;
  BOOL allowMultipleSelection;
  BOOL allowNoSelection;
  NSUInteger maximumSelections;
  BOOL autoDismissViewController;
  SCDataDefinition *intermediateEntityDefinition;
}

This class functions as a section that provides the end-user with an automatically generated list objects to choose from.

The selection items are provided in the form of an array of NSObjects, called the items array. ‘SCObjectSelectionSection’ 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 section must be of type NSObject, otherwise it must be of type NSMutableSet.

See

SCObjectSelectionCell.

Creation and Initialization

  • Allocates and returns an initialized ‘SCObjectSelectionSection’ given cell text, bound object, a bound property name, and a selection items store.

    • - parameter: sectionHeaderTitle The section’s header title.
    • - parameter: object The object the section will bind to.
    • - parameter: propertyName The section’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.
    • - parameter: store The store containing the selection objects.

    Declaration

    Objective-C

    + (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle
                               boundObject:(NSObject *)object
                selectedObjectPropertyName:(NSString *)propertyName
                       selectionItemsStore:(SCDataStore *)store;
  • Allocates and returns an initialized ‘SCObjectSelectionSection’ given cell text, bound object, a bound property name, and an array of selection items.

    • - parameter: sectionHeaderTitle The section’s header title.
    • - parameter: object The object the section will bind to.
    • - parameter: propertyName The section’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.
    • - parameter: sectionItems An array of the items that the user will choose from. All items must be of an NSObject type and all items must be instances of the same class.
    • - parameter: definition The definition of the selection items.

    Declaration

    Objective-C

    + (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle
                               boundObject:(NSObject *)object
                selectedObjectPropertyName:(NSString *)propertyName
                                     items:(NSArray *)sectionItems
                            itemsDefintion:(SCDataDefinition *)definition;
  • Returns an initialized ‘SCObjectSelectionSection’ given cell text, bound object, a bound property name, and a selection items store.

    • - parameter: sectionHeaderTitle The section’s header title.
    • - parameter: object The object the section will bind to.
    • - parameter: propertyName The section’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.
    • - parameter: store The store containing the selection objects.

    Declaration

    Objective-C

    - (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle
                            boundObject:(NSObject *)object
             selectedObjectPropertyName:(NSString *)propertyName
                    selectionItemsStore:(SCDataStore *)store;
  • Returns an initialized ‘SCObjectSelectionSection’ given cell text, bound object, a bound property name, and an array of selection items.

    • - parameter: sectionHeaderTitle The section’s header title.
    • - parameter: object The object the section will bind to.
    • - parameter: propertyName The section’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.
    • - parameter: sectionItems An array of the items that the user will choose from. All items must be of an NSObject type and all items must be instances of the same class.
    • - parameter: definition The definition of the selection items.

    Declaration

    Objective-C

    - (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle
                            boundObject:(NSObject *)object
             selectedObjectPropertyName:(NSString *)propertyName
                                  items:(NSArray *)sectionItems
                         itemsDefintion:(SCDataDefinition *)definition;

Configuration

Internal Properties & Methods (should only be used by the framework or when subclassing)

  • ///////////////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////////////////

    Declaration

    Objective-C

    - (void)configureCellForDisplay:(SCTableViewCell *)cell
                            atIndex:(NSUInteger)index;

Other