TimelineMarker

public struct TimelineMarker
extension TimelineMarker: View
extension TimelineMarker: _ViewEmptyChecking

TimelineMarker is a non-selectable view intended for timelineMarkers that require beforeStart, start, beforeEnd and end status that displays timelineMarker details. It uses a vertical line and timelineNode as a separator. To the left of the vertical line is the timeline timestamp stack view that contains timestamp and secondaryTimestamp. To the right of the vertical line is the main stack view that contains title. There is a divider line as separator under main stack.

Notes

Separator between TimelineMarker Items in the List

All list styles in SwiftUI include separators by default. This is why there is a separator between two timelineMarker items in the list. To get rid of the separator, set ‘listRowSeparator’ modifier to hidden.

Usage

TimelineMarker(timestamp: "06/20/24", secondaryTimestamp: .icon(Image(systemName: "sun.max")), timelineNode: .beforeStart, title: "Before Start", isPast: true, showUpperVerticalLine: false)
TimelineMarker(timestamp: "06/20/24", secondaryTimestamp: .text("Sunny"), timelineNode: .beforeEnd, title: "Before End", isPresent: true)