init(matching:majorAlignment:limitBehavior:)
Creates a scroll target behavior that aligns to values spaced at regular intervals along the scrollable axes.
Declaration
nonisolated init(matching components: DateComponents, majorAlignment: MajorValueAlignment<Date>? = nil, limitBehavior: ValueAlignedLimitBehavior = .automatic)Parameters
- components:
The components to search for when aligning after the user finishes scrolling.
- majorAlignment:
The behavior for aligning to major values. When the user swipes on the chart, the chart will snap to the next or previous major unit depending on the swipe direction. When enabled, the default major unit is a page.
- limitBehavior:
The scroll limit behavior.