struct Context
Information passed to a timeline view’s content callback.
Availability 有効性
Technology
init(_ schedule: Schedule, content: @escaping (TimelineView
<Schedule, Content>.Context
) -> Content)
Schedule
conforms to TimelineSchedule
and Content
conforms to View
.schedule
A schedule that produces a sequence of dates that indicate the instances when the view should update. Use a type that conforms to Timeline
, like every
, 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 Timeline
that includes the date from the schedule that prompted the update, as well as a Timeline
value that the view can use to customize its appearance.
struct Context