Weeknotes № 4
While Florian was away the first few days this week to hold a workshop, I prepared some more things for next week’s workshop. During the workshop, we use an internal Mac app to present things to the attendees. For example, we show layout trees, render trees and have an interactive alignment visualization. Some of these only worked well in dark mode, and I fixed that. I used a combination of
.background(.background) to set the background to the current background style, as well as
.backgroundStyle(colorScheme == .light ? …) to set the current background style.
In the workshop app that our attendees receive, I also added interactive render tree examples:
In our alignment demos, I used
.reversedMask to obscure parts of a view. You can see this in the screenshot below: the alignment guides are continuous lines with the text (+ padding) cut out:
In recent years, I only wrote up to three posts a year, this week I wrote three posts (including this one). First, I wrote about how SwiftUI views are lists and about Variadic Views. The variadic view posts includes rendered SwiftUI views that are automatically generated at compile time of this blog. The images automatically switch between light mode and dark mode (similar to the screenshots in this post).
At home, I made two of my favorite left over recipes: we used left over pasta sauce for empanada filling. Also, we used left over risotto and made a small batch of air fried mozarella arancinis.