SwiftUI Weekly - Issue #108
The curated collection of links about SwiftUI. Delivered every Monday.
News
SwiftUI Index
Complete ordered index & changelog of all SwiftUI views, properties and modifiers.
Reading
Mastering NavigationStack in SwiftUI. Deep Linking.
This week we will continue exploring the new Navigation API in SwiftUI. One of the benefits of the new data-driven Navigation API is the programmatic navigation with deep-linking possibilities. Let’s dive into the new API by learning how to build programmatic deep navigation flows.
SwiftUI for Mac 2022
In December 2019, I wrote a series of articles about using SwiftUI to build a Mac app. And in July 2020, I re-visited the sample app to apply the new SwiftUI features made available in macOS BigSur. Now that macOS Ventura and Xcode 14 are in beta, it’s time to build the app again while learning how to incorporate the new APIs.
Understanding SwiftUI's ViewThatFits container.
Starting with iOS 16, SwiftUI provides a new layout container `ViewThatFits` which helps us build adaptive layouts. The `ViewThatFits` container allows us to provide multiple views while automatically picking the first one which fits into available space. Let's directly jump into an example to see how the container might benefit us.
PhotosPicker on SwiftUI
Apple's new SwiftUI PhotosPicker API and load asset data on demand with PhotosPickerItem.loadTransferable. No more UIViewControllerRepresentable!
Using QuickLook with SwiftUI
SwiftUI is growing with every new release, but there are still old treasures to be found in various Apple frameworks, that aren’t part of the core SwiftUI library. One example is MapView in MapKit, another is the amazing quickLookPreview view modifier in the QuickLook framework. Let’s take a quick look.
Video
Building custom SwiftUI property wrappers.
Donny demonstrates how to implement a custom made property wrapper for SwiftUI views to fetch data from a JSON feed. He also shows how to test it and shares his learnings and some valuable tips.
SwiftUI Inner Shadows + Core Motion = Beautiful and Easy Depth Effect!
SwiftUI for iOS 16 introduces the ability to create inner shadows for icons, text, and more, and if we add just a little Core Motion we can create a beautiful depth effect that adjusts our shadow as the user tilts their device – it's easier than you might think!