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)
-
init(timestamp:
secondaryTimestamp: timelineNode: icon: title: isPast: isPresent: showUpperVerticalLine: showLowerVerticalLine: ) Undocumented
Declaration
Swift
public init(@ViewBuilder timestamp: () -> any View = { EmptyView() }, @ViewBuilder secondaryTimestamp: () -> any View = { EmptyView() }, @ViewBuilder timelineNode: () -> any View, @ViewBuilder icon: () -> any View = { EmptyView() }, @ViewBuilder title: () -> any View, isPast: Bool = false, isPresent: Bool = false, showUpperVerticalLine: Bool = true, showLowerVerticalLine: Bool = true)
-
init(timestamp:
secondaryTimestamp: timelineNode: icon: title: isPast: isPresent: showUpperVerticalLine: showLowerVerticalLine: ) Undocumented
Declaration
Swift
init(timestamp: AttributedString? = nil, secondaryTimestamp: TextOrIcon? = nil, timelineNode: TimelineNodeType, icon: Image? = nil, title: AttributedString, isPast: Bool = false, isPresent: Bool = false, showUpperVerticalLine: Bool = true, showLowerVerticalLine: Bool = true)
-
Undocumented
Declaration
Swift
init(_ configuration: TimelineMarkerConfiguration)
-
Declaration
Swift
public var body: some View { get }
-
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }