SelectionType

public enum SelectionType: Equatable

Used to determine the selection and deselection behaviour or a SelectionViewController. Combine this with SelectionViewController.requiresSelection to enforce selection behaviours.

  • All

    Case representing the user’s selection criteria over the entire table. The selection’s positions in each section of the table is not accounted for.

    Declaration

    Swift

    case All(min:Int, max:Int?)
  • Case representing the user’s selection criteria over the entire table with constraints on each section of the table.

    Declaration

    Swift

    case Sectioned(sectionMin:Int, sectionMax:Int?, totalMin:Int, totalMax:Int?)

    Parameters

    sectionMin

    The minimum selection that the user is allowed in a single selection if requiresSelection is true.

    sectionMax

    The maxiumum selection that the user is allowed in a single selection. nil if there is no per section restriction. The cell items will be deselected if the number of selectedKeys on a SelectionViewController for a given section is exceeded in a first in first out manner for that section.

    totalMin

    The minimum selection that the user is allowed over the entire table if requiresSelection is true.

    totalMax

    The maxiumum selection that the user is allowed over the entire table. nil if there is no restriction.

  • Only a single item can be selected. If requiresSelection, there must be one and only one selection.

    .All(min:1, max:1)
    

    Declaration

    Swift

    public static var Single: SelectionType
  • Only a single item in each section can be selected. If requiresSelection, one and only one item must be selected in each section.

    .Sectioned(sectionMin:1, sectionMax:1, totalMin: nil, totalMax: nil)
    

    Declaration

    Swift

    public static var SingleSectioned: SelectionType
  • Multiple items can be selected. If requiresSelection, at least one item from any section must be selected.

    .All(min:1, max:nil)
    

    Declaration

    Swift

    public static var Multiple: SelectionType
  • Multiple items in a given section can be selected. If requiresSelection, at least one item must be selected in each section.

    .Sectioned(sectionMin:nil, sectionMax:nil, totalMin: 1, totalMax: nil)
    

    Declaration

    Swift

    public static var MultipleSectioned: SelectionType