A first look at matchedGeometryEffect

SwiftUI provides great support for animation, allowing us to animate changes to views, or to a view's state. In the latest version of SwiftUI, included in the iOS 14 beta, we get a new method, matchedGeometryEffect, which defines a group of views with synchronized geometry. Combining this method with SwiftUI's support for animations allows us to animate a change in the position and size of two or more views in our view hierarchy. In this post, Sarun shows us how it's done.

Adding optional @Bindings to SwiftUI views

SwiftUI gained a number of new view types at WWDC this year, one of them being DisclosureGroup. DisclosureGroup acts like an expandable cell, showing or hiding it's content based on it's disclosure state. One interesting aspect of this view is that it provides a number of initializers, some of which require an isExpanded binding, some of which don't. In other words, this isExpanded binding is optionally passed in when the view is initialized. In this post, Federico Zanetello shows us how we can add optional bindings to SwiftUI views, by creating his own version of the DisclosureGroup view.

Returning to an old hobbyhorse: Migrating higher order function names to comply with API guidelines

A higher order function is a function which takes a function as an argument, or returns a function. In this post from the Swift forums, Erica Sadun pitches a proposal to rename Swift's higher order functions, such as map and filter, based on the Swift API design guidelines. It's something which can be done without causing breaking changes, and I am in favour of the proposal.