iOS 15 WidgetKit: Building Widgets with SwiftUI
Specifically for iOS 15, Xcode 13 and SwiftUI 3.
Apple first introduced Widgets in iOS 14 at WWDC 2020, and they've been one of the most popular additions to iOS in recent years. In this book, we'll cover everything there is to know about WidgetKit; Apple's framework to build widgets for iOS and iPadOS. đ
What's in the Book?
This book is going to take you through the full spectrum of functionality that widgets offer; youâll learn everything there is to know about them. To keep the content WidgetKit specific; we wonât be delving too deeply into the standard SwiftUI side of things. Weâll be keeping the user interfaces really simple and purely focussing on the quirks of using WidgetKit.
In Chapter 2, weâll start by learning the basics and fundamentals of WidgetKit and explore the terminology used by Apple. Weâll configure a simple iOS app project that contains multiple, static widgets along with the main iOS app. âïž
Following on, in Chapter 3 weâll use these fundamental principles to build a simple Battery Status widget similar to the default app found in iOS 15. Youâll learn how to populate the widget with real battery level data and display it in different UIs depending on the widget size. đ
In Chapter 4, weâll take things further by building a ToDo List app and widget where the data displayed on the widget is shared between the two. Youâll also learn how to manually refresh widgets from the parent app when data is changed. â
Lastly in Chapter 5, weâll build a Weather Forecast widget with real, localised weather data fed directly from a weather API. Weâll also explore how we can give the user the ability to customise and configure their widget by allowing them to choose a location for the weather forecast directly from the widget. â
Table of Contents
Download the full table of contents. đ
Download a Free Sample!
Here's a sample introduction chapter from the eBook. No email address required. đ
Any Pre-Requisites Needed?
The book assumes a basic understanding of SwiftUI. Whilst the content of the book focuses on WidgetKit, and not on building complex UIs; an understanding of the basic SwiftUI concepts is needed. đ
Any other Questions?
If you have any questions or suggestions, please don't hesitate to contact me on Twitter and I'll do my best to help. đ
You'll get the download version of iOS 15 WidgetKit: Building Widgets with SwiftUI as PDF.
Pages
58Format
PDFSource Code
Xcode Projects
- You'll get the download version of iOS 15 WidgetKit: Building Widgets with SwiftUI as PDF.
- Pages58
- FormatPDF
- Source CodeXcode Projects