From the course: Apple watchOS 7 App Development Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configure timelines

Configure timelines - watchOS Tutorial

From the course: Apple watchOS 7 App Development Essential Training

Start my 1-month free trial

Configure timelines

- [Instructor] We've looked at a single timeline entry in the current time, but what if you had several scheduled entries? For example, each of our stages in the pizza delivery app could be at a scheduled time. For that you create an array of timelineEntries and feed it to the data source. So, I'm going to close up the app again and head to the bottom of the extension here. And there is a method here called createOrderTimeline. And that's going to return an array of ComplicationTimelineEntries. And I've already created a variable for it. So we're ready to go on this, and then it'll return those timelineEntries. Now, what we're going to do here is use some timelineEntries to do that. I've set up that for you in stages. And you'll find here that there is an array times and I've actually got a getter here for times right here, so that we can use those times in this timelineEntry. So I've got those arrays, so I can go…

Contents