This week Apple has updated iPad Pro and added trackpad support to iPadOS. We still don't have someth

SwiftUI Weekly The curated collection of links about SwiftUI. Deliver every Monday.

This week Apple has updated iPad Pro and added trackpad support to iPadOS. We still don’t have something like onHover modifier that we can attach to SwiftUI views and detect trackpad position. I hope Apple will provide us something similar pretty soon.

News

Reading

Anchor preferences in SwiftUI swiftwithmajid.com – Share Today we will continue mastering view preferences in SwiftUI that we touched a few weeks ago. Anchor preferences are another type of view preferences provided by SwiftUI. The main goal of anchor preferences is to pass layout data like bounds, center coordinates, etc. to its parent view.

SwiftUI Line Graph Animation www.objc.io – Share Implement and animate a line graph. For a bonus challenge: add a small dot that follows the tip of the graph.

Advanced SwiftUI Animations - GeometryEffect swiftui-lab.com – Share To learn how to add a small dot that follows the tip of the graph , take a look at the awesome GeometryEffect guide.

Introducing and explaining the PreviewBackground package rhonabwy.com – Share While learning and experimenting with SwiftUI, I use the canvas assistant editor to preview SwiftUI views extensively. It is an amazing feature of Xcode 11 and I love it. There is a quirk that gets difficult for me though – the default behavior of the preview provider uses a gray background. I frequently use multiple previews while making SwiftUI elements, wanting to see my creation on a background supporting both light and dark modes.

Creating a Mind-Map UI in SwiftUI www.raywenderlich.com – Share In this tutorial, you’ll learn how to create this type of mind-map spatial UI using SwiftUI. You’ll create a simple mind-mapping app that allows you to place text boxes on the screen, move them around and create connections between them.

Code

CombineExt github.com – Share CombineExt provides a collection of operators, publishers and utilities for Combine, that are not provided by Apple themselves, but are common in other Reactive Frameworks and standards.

Breathe Animation in SwiftUI github.com – Share The Breathe app on watchOS has a really excellent animation. Here is an attempt to recreate this animation in SwiftUI using offsets, rotation, and scaling, then making the animation repeat forever.

Video

Wrapping Map View talk.objc.io – Share In this episode, we’ll wrap an MKMapView in a SwiftUI view. In expanding upon Apple’s tutorial about the same topic, we will add the ability to provide an array of annotations, and changes to this array should result in annotations being added and removed with animations.

Did you enjoy this issue?

If you don't want these updates anymore, please unsubscribe here If you were forwarded this newsletter and you like it, you can subscribe here