Protocol

TimelineSchedule

A type that provides a sequence of dates for use as a schedule.

Declaration 宣言

protocol TimelineSchedule

Overview 概要

Types that conform to this protocol implement a particular kind of schedule by defining an entries(from:mode:) method that returns a sequence of dates. Use a timeline schedule type when you initialize a TimelineView. For example, you can create a timeline view that updates every second, starting from some startDate, using a periodic schedule returned by periodic(from:by:):


TimelineView(.periodic(from: startDate, by: 1.0)) { context in
    // View content goes here.
}

You can also create custom timeline schedules. The timeline view updates its content according to the sequence of dates produced by the schedule.

Topics 話題

Getting Built-in Schedules

Getting a Sequence of Dates

Specifying a Mode

Supporting Types 支援を行う型

Relationships 関係

See Also 参照

Timelines