Initializer

init(_:content:)

Creates a new timeline view that uses the given schedule.

Declaration 宣言

init(_ schedule: Schedule, content: @escaping (TimelineView<Schedule, Content>.Context) -> Content)
Available when Schedule conforms to TimelineSchedule and Content conforms to View.

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 TimelineView.Context that includes the date from the schedule that prompted the update, as well as a TimelineView.Context.Cadence value that the view can use to customize its appearance.

See Also 参照

Creating a Timeline