Swift Discovery #19
Welcome to another issue of Swift Discovery newsletter. Let's explore more Swift and SwiftUI features we've got from WWDC24
Articles
What’s new in SwiftUI for iOS 18
Learn MainActor changes for SwiftUI View protocol, and new enhancements for ScrollView as well as subview control.
Introducing Entry macro in SwiftUI
Reduce boilerplate code in EnvironmentKey with Entry macro
List or LazyVStack: Choosing the Right Lazy Container in SwiftUI
Learn the difference between List and LazyVStack and when to choose which
Vulnerabilities affecting the CocoaPods ecosystem
Multiple vulnerabilities affecting the CocoaPods ecosystem, have been discovered, posing a major risk of supply chain attacks.
Zoom transitions
Learn how to use the new navigationTransition in SwiftUI from iOS 18
Blend Modes in SwiftUI
Learn different blend modes for compositing this view with overlapping views
Using PreviewModifier to build a previewing environment
Xcode 16 and iOS 18 come with a feature that allows us to build elaborate preview environments using a new PreviewModifier protocol
Mixing colors in SwiftUI
SwiftUI in iOS 18 and macOS 15 has gained a new trick; it can mix colors
Using TextRenderer to create highlighted text
TextRenderer is a new protocol introduced at WWDC 2024 which lets us enhance how text is rendered in SwiftUI.
Wrapping text within another view in SwiftUI
Choose between ZStack and overlay to wrap Text within another view in SwiftUI
Open Source
StreamUI
StreamUI is a library designed for SwiftUI that enables developers to create dynamic videos programmatically
Videos
Favorite SwiftUI Updates in iOS 18
WWDC 2024 introduced awesome new additions to SwiftUI in iOS 18. In this video I highlight a few of my favorites including Mesh Gradients, zoom transitions in NavigationStacks, SF Symbols 6 and the new animations, floating TabView and custom sheet sizes on iPadOS, and date reference Text formatting.
Build your next website in Swift
Swift's result builders let us create domain-specific languages right inside our Swift code, and with a little thinking that means we can actually build whole websites in Swift – and even use similar syntax to SwiftUI!