Contents

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

See Also

Updating a view on a schedule