CPCViewSelection
public enum CPCViewSelection : Equatable
A value that describes view selection mode and currently selected days simultaneously.
-
Selection is disabled.
Declaration
Swift
case none -
Single day selection mode; associated value holds currently selected day or
nilif selection is empty.Declaration
Swift
case single(CPCDay?) -
Range of dates selection mode; associated value holds currently selected days range (possibly empty).
Declaration
Swift
case range(CountableRange<CPCDay>) -
Arbitrary set of dates selection mode; associated value holds unordered collection of selected dates (possibly empty).
Declaration
Swift
case unordered(Set<CPCDay>) -
Arbitrary array of dates selection mode; associated value holds collection of selected dates (possibly empty) ordered the same way that user did pick them.
Declaration
Swift
case ordered([CPCDay])
-
Declaration
Swift
public var description: String { get } -
Declaration
Swift
public var debugDescription: String { get }
-
Undocumented
Declaration
Swift
public typealias ReferenceType = _ObjectiveCType -
Undocumented
Declaration
Swift
public typealias _ObjectiveCType = __CPCViewSelection -
Declaration
Swift
public func _bridgeToObjectiveC() -> __CPCViewSelection -
Declaration
Swift
public static func _forceBridgeFromObjectiveC(_ source: __CPCViewSelection, result: inout CPCViewSelection?) -
Declaration
Swift
public static func _conditionallyBridgeFromObjectiveC(_ source: __CPCViewSelection, result: inout CPCViewSelection?) -> Bool -
Declaration
Swift
public static func _unconditionallyBridgeFromObjectiveC(_ source: __CPCViewSelection?) -> CPCViewSelection
-
Check whether a day is selected given all selected days.
Declaration
Swift
public func isDaySelected(_ day: CPCDay) -> BoolParameters
dayThe day to check for containment.
Return Value
trueif given is contained in the selection; otherwise,false. -
A Boolean value indicating whether the selection does not contain any day.
Declaration
Swift
public var isEmpty: Bool { get } -
Returns set of days contained by exactly one of given selection values.
Declaration
Swift
public func difference(_ other: CPCViewSelection) -> Set<CPCDay>Parameters
otherSelection value to calculate difference from.
Return Value
Difference between selection values.
-
Returns a subset of this selection that contains days matching specified date constraints.
Declaration
Swift
public func clamped<R>(to datesRange: R) -> CPCViewSelection where R : CPCDateIntervalParameters
datesRangeThe limits to clamp this selection to.
-
Forms union of two values and stores the result in the left-hand-side variable.
Declaration
Swift
public static func += (lhs: inout CPCViewSelection, rhs: CPCViewSelection)Parameters
lhsThe first value to unite.
rhsThe second value to unite.
-
Forms union of two values and returns it leaving original values unchanged.
Declaration
Swift
public static func + (lhs: CPCViewSelection, rhs: CPCViewSelection) -> CPCViewSelectionParameters
lhsThe first value to unite.
rhsThe second value to unite.
-
Subtracts from the first value days that are selected byn the second one and stores the result in the left-hand-side variable.
Declaration
Swift
public static func -= (lhs: inout CPCViewSelection, rhs: CPCViewSelection)Parameters
lhsSelection value to subtract days from.
rhsValue indicating days that should not be selected.
-
Calculates selection that contains all of the left-hand-side days except those contained in right-hand-side one and returns it leaving original unchanged.
Declaration
Swift
public static func - (lhs: CPCViewSelection, rhs: CPCViewSelection) -> CPCViewSelectionParameters
lhsSelection value to subtract days from.
rhsValue indicating days that should not be selected.
View on GitHub
Install in Dash
CPCViewSelection Enumeration Reference