Chapter 24: Getting Started with Widgets
Apple introduced WidgetKit during WWDC 2020. WidgetKit allows you to show relevant and glanceable content from your app on the iOS Home Screen.
In this chapter, you'll implement a widget for your LetsEat
project using WidgetKit that will show you the restaurants at a specific location.
You'll start by adding a widget extension to your app. You'll configure your widget to display restaurants in a specific location, and you'll customize how your widget looks. Finally, you'll add your widget to your Home Screen.
By the end of this chapter, you'll have learned how to create and configure a widget, and you'll be able to implement widgets for your own apps.
The following topics will be covered:
- Introducing widgets
- Adding a widget target to your app
- Providing timeline entries to your widget
- Customizing your widget's view
- Adding your widget to the Home Screen