SwiftUI Weekly - Issue #29
The curated collection of links about SwiftUI. Delivered every Monday.
News
Apple’s use of Swift and SwiftUI in iOS 14
Swift was introduced a couple of years ago at Apple's 2014 WWDC. Over the years I analyzed iOS to measure how many built-in applications were using Swift. iOS 9 released in 2015 included a single application written with Swift: Calculator. Since then this number has grown with each iOS release: iOS 10.1, iOS 11.1, iOS 12.0 and finally iOS 13.1.
Reading
Mastering ScrollView in SwiftUI
We had the scroll view from the very first version of SwiftUI. It was quite limited. But this year changed everything when Apple released ScrollViewReader during WWDC 20. This week we will learn all about scroll views in SwiftUI. We will learn how to scroll to the particular position and read the current offset of scroll view content.
Handling Undo & Redo in SwiftUI
Integrate with UndoManager in SwiftUI by building a reusable UndoProvider view that can be used with any Binding.
Encapsulating SwiftUI view styles
An overview of the tools and techniques that we can use to create a clean separation between our view hierarchy, its styles, and the components that we’re looking to reuse across a given project.
SwiftUI View Modifiers and if #available
Doing availability checks with SwiftUI's declarative syntax can be a little messy. Here's a custom view modifier that can help.
How we built the iOS 14 widget for Kahoot!
We'll show you how we built the Kahoot! iOS 14 widget, step by step.
Disabling Keyboard Avoidance in SwiftUI's UIHostingController
UIHostingController has logic to avoid the keyboard, which is often unwanted. We explore a hack to disable this feature.
Code
SwiftUICharts
A simple line and bar charting library that supports accessibility written using SwiftUI.
data-field
A SwiftUI view that wraps a text field to only accept specific data.
Video
GraphQL Interfaces, Unions, and Fragments In SwiftUI
Review of Interfaces and Unions. How to create queries using Fragments for these GraphQL types. And how to configure and query from an iOS SwiftUI application using Apollo iOS client.