From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Make a widget, part 3: Timelines

Make a widget, part 3: Timelines

From the course: iOS Development Tips

Make a widget, part 3: Timelines

- Widgets are not meant to be static like the ones we have here. They're meant for quick glance at relevant changing information. In our pizza app, we're informing the user of the delivery stages of a pizza. Now I have a model that I've already set up of this which is Stages.swift up here. And you can see there it is. It's just a simple array of strings. And I'm going to go through the stages of making and delivering the pizza. Now I'm going to go back down to the pizza time widget here, and let's go to where all this happens is get timeline in completion. And so here in this method, we build a timeline of dates that say, okay, we have a new event. I want you to change the view here. So we're going to go through that. Now, the best way to do this, depending on what you're doing is you probably get it from a server or something like that. You'd probably, you know have some notifications or you'd pull it from the…

Contents