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 - watchOS Tutorial
From the course: Apple watchOS 7 App Development Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
What complications are4m 41s
-
Add launch complication images and symbols6m
-
(Locked)
Data providers8m 24s
-
(Locked)
Populate a complication template4m 25s
-
(Locked)
Challenge53s
-
(Locked)
Solution5m 11s
-
(Locked)
Configure sample templates4m 11s
-
(Locked)
Timeline entries3m 54s
-
(Locked)
Configure timelines5m 6s
-
(Locked)
Launching a timeline4m 10s
-
(Locked)
-
-
-