TimeSelector

public struct TimeSelector

Defines a set of related time intervals and an optional way to generate labels to be displayed for them in a timeline diagram, computed according to the referenced selection logic.

  • Initializes a time selector, such as for highlighting in a timeline or for generating labels in a header row, based on an interval selector (that computes the time intervals to be selected) and an optional label generator (that would compute the textual values to be presented as labels for the selected time intervals).

    Declaration

    Swift

    public init(intervalSelector: TimeIntervalSelector,
                labelGenerator: TimeLabelGenerator? = nil)
  • Selects time intervals to consider.

    Declaration

    Swift

    public var intervalSelector: TimeIntervalSelector
  • Generates labels for the selected time intervals.

    Declaration

    Swift

    public var labelGenerator: TimeLabelGenerator?
  • Allows selecting a style for any specific time area generated by the time selector by calling a client function with an argument of time interval type for that area.

    Declaration

    Swift

    public var styleSelector: TimeAreaStyleSelector?
  • Default style for time areas generated by the time selector, used if a style selector is not set.

    Declaration

    Swift

    public var style: TimeAreaStyle?
  • State information identifying the external context (such as a data object) that the item is associated to. Set it upon item construction to be able to use it within specific protocol function handlers that receive the item among arguments.

    Declaration

    Swift

    public var context: Any?