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.
-
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
sectionMinThe minimum selection that the user is allowed in a single selection if
requiresSelectionis true.sectionMaxThe maxiumum selection that the user is allowed in a single selection.
nilif there is no per section restriction. The cell items will be deselected if the number ofselectedKeyson aSelectionViewControllerfor a given section is exceeded in a first in first out manner for that section.totalMinThe minimum selection that the user is allowed over the entire table if
requiresSelectionis true.totalMaxThe maxiumum selection that the user is allowed over the entire table.
nilif 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
View on GitHub
SelectionType Enum Reference