Contents

init(_:content:)

Creates a new timeline view that uses the given schedule.

Declaration

nonisolated init(_ schedule: Schedule, @ViewBuilder content: @escaping (TimelineView<Schedule, Content>.Context) -> Content)

Parameters

  • schedule:

    A schedule that produces a sequence of dates that indicate the instances when the view should update. Use a type that conforms to Timelineschedule, like Everyminute, or a custom timeline schedule that you define.

  • content:

    A closure that generates view content at the moments indicated by the schedule. The closure takes an input of type Context that includes the date from the schedule that prompted the update, as well as a Cadence Swift.enum value that the view can use to customize its appearance.