SwiftUI Weekly - Issue #122
The curated collection of links about SwiftUI. Delivered every Monday.
CI/CD for iOS and macOS developers. Fast builds on M1 machines and predictable pricing. Automatic code signing and publishing with really good documentation.
Learn how to use Swift Charts to transform data into elegant and accessible graphs.
With Xcode 14, Apple introduced a PresentationDetent struct into SwiftUI, to control the height of a bottom sheet.
As we saw in last week’s post, complex gestures in a SwiftUI ScrollView is complicated, since they can block the scrolling. However, if we don’t have a scroll view, things become a lot easier. Let’s take a look at a version of the button that we created last week, that uses a single gesture.
The maths required for SwiftUI custom layout reminds me of the days before AutoLayout and the constraints based system. The good thing is that Simple Layout Engine already provides a nice system to handle all the maths involved. To demonstrate I would use build the subset of the demo app from the WWDC session on this topic: Compose custom layouts with SwiftUI.
modifier in SwiftUI doesn’t limit hit testing to the clipping region. The clipped view can still receive taps/clicks outside the visible area. Add
to change this behavior.
Navigation in SwiftUI can be complex, but it doesn't have to be that way. We are releasing a
new version of our SwiftUI Navigation library that makes it easier to use NavigationStack,
alerts, confirmation dialogs, and even fixes a few bugs in SwiftUI.
In this video, I will show you the new AnyLayout, the type-erased instance of the layout protocol that allows you to dynamically change the type of layout container without destroying the stat of the subviews.