Weeknotes № 9

I spent last week teaching a workshop in Berlin. It was the first time in years doing an in-person workshop, which was really great. Im doing another in-person workshop in Hanover this week, and giving a talk in Hamburg at their CocoaHeads meetup. Both teaching the workshop from … | Continue reading


@chris.eidhof.nl | 2 months ago

Weeknotes № 8

Last week I had to prepare a bunch of other things (workshops, start on a presentation) and only had limited time for the Field Guide. I also wanted to recover a bit from pushing myself. It’s kind of similar to running training: to achieve things on the short term, you need to pu … | Continue reading


@chris.eidhof.nl | 2 months ago

Weeknotes № 5-7

Over the last few weeks I worked with a strong focus and did not take the time to write weeknotes. The SwiftUI Field Guide is now live. I’ll try to blog a bit more about the why and how in the upcoming weeks. It felt a bit like preparing for a marathon: I worked hard at it almost … | Continue reading


@chris.eidhof.nl | 2 months ago

Weeknotes № 4

We’re in the polishing phase of the new SwiftUI web project, and I spent quite some time on getting the animations right. The framework now supports some basic transitions as well as animating the frame of views. Currently, property animations are not supported (although I think … | Continue reading


@chris.eidhof.nl | 3 months ago

Weeknotes № 3

Last week was really busy, but in a relatively balanced way. We got fresh snow and spent a bunch of time pulling sledges. I also ran every single day of the week, without problems (92km in total). One more week until my 12-week marathon preparation starts. This week I’m hoping to … | Continue reading


@chris.eidhof.nl | 3 months ago

Weeknotes № 2

The persistent cough I’ve had for weeks is finally getting better. I started running again (small steps). Originally, I wanted to start my marathon preparation a few weeks ago, but I had to postpone to get healthy again first. This means I can’t do a 16-week prep as usual, so I’l … | Continue reading


@chris.eidhof.nl | 4 months ago

Weeknotes № 1

Last week the kids were still at home, so my week was mostly filled with care tasks. I had officially started my marathon plan on Dec 18th, and while the first day or two went great, I then got a pretty intense cough which is still not completely gone. I only managed to put in a … | Continue reading


@chris.eidhof.nl | 4 months ago

SwiftUI Binding Tips

When working with bindings in SwiftUI, it can be useful to modify bindings. For example, in a Slack I’m part of, someone had a binding to a Boolean and wanted to negate it. This was (roughly) the code they had: extension Binding where Value == Bool { func toggled() -> Self { … | Continue reading


@chris.eidhof.nl | 4 months ago

Weeknotes № 51-52

In between Christmas and New Years I’ve been slowly making progress on my layout explanations website. Nicholas (the designer) has been putting out different possible designs, and I’ve been trying to implement some of it (both in SwiftUI as well as in my web port). I also spent … | Continue reading


@chris.eidhof.nl | 4 months ago

Weeknotes № 49-50

We recorded some Swift Talk episodes about tweakable values. We also continued implementing the new design for our website (and Swift Talk). It’s still not finished, hopefully soon. I also spent a bunch of time on my SwiftUI layout explanation site. It’s not so easy to figure ou … | Continue reading


@chris.eidhof.nl | 5 months ago

Weeknotes № 46-47

Here are the combined weeknotes for the last two weeks. I visited my friend in London and met up with a bunch of friends. The NSLondon folks were nice enough to organize a drinks night, was great to see many old and new friends. London feels almost like the opposite of where we … | Continue reading


@chris.eidhof.nl | 5 months ago

Weeknotes № 48

We held two workshops last week, one in PT and one in ET. This meant staying up (quite) late for five days in a row. It always takes some getting used to. But the advantage is that I had lots of daylight time to do other stuff. I built a large wooden horse for my daughter. I fin … | Continue reading


@chris.eidhof.nl | 5 months ago

Weeknotes № 45

On Monday I was excited to finally have a regular week of work again without any travel or other big things. Little did I know. On Monday we all got really sick. It knocked the whole family out for multiple days. In the end, I did get a few days of solid work in last week. After … | Continue reading


@chris.eidhof.nl | 6 months ago

Weeknotes № 44

The first half of last week I was still away, so nothing much happened. The second half of the week we started preparing two more workshops. We prepare each workshop specifically for the company we teach, so it’s always quite a bit of work. We believe it’s useful for the company … | Continue reading


@chris.eidhof.nl | 6 months ago

Weeknotes № 43

I think a lot of Apple’s documentation could be improved. For example, I think SwiftUI’s layout system could be explained in a much better way. We try to do so in our workshops and books, but I think interactive explanations on a public website would be even better. A few years a … | Continue reading


@chris.eidhof.nl | 6 months ago

Weeknotes № 42

Still on my time off. We’re away in a holiday park, so I’m keeping the laptop mostly shut. I’ve done a tiny bit of work at the beginning of the week, hopefully I can share some of that soon. Mainly writing this post as to not break the streak. | Continue reading


@chris.eidhof.nl | 6 months ago

Weeknotes № 41

As a short break from my time off, we ran a workshop last week. I also took the opportunity to finally (after we moved in a few months ago) get my desk set up. I switched the saw horses for my standing desk base, added cable management and brought out all the gear I use when runn … | Continue reading


@chris.eidhof.nl | 7 months ago

Weeknotes № 40

I’m taking some time off this month to focus on the family and get the final home improvement bits done before winter is here. I am working on some small side-projects and we will run a workshop this week. One of the things I experimented with is a generic programming library. T … | Continue reading


@chris.eidhof.nl | 7 months ago

Weeknotes № 39

We shipped Thinking in SwiftUI last week! It’s now available in PDF and print. We’re very happy with the result (and open for suggestions, of course). One thing that’s currently missing which we might add (depending on how hard it is) is an ePub version. Without having implement … | Continue reading


@chris.eidhof.nl | 7 months ago

Weeknotes № 38

Last week we recorded a bunch of episodes around building a small marquee component. We wanted to make it interactive (similar to a scroll view) which makes the underlying implementation a bit different from how you would normally write SwiftUI components. The animations are driv … | Continue reading


@chris.eidhof.nl | 7 months ago

Weeknotes № 37

Last week we finalized the layout for Thinking in SwiftUI. Now we need to check the (print) proof copy and verify everything is okay before we can finally release it! I also spent some more time on my typing recorder app, it’s really starting to take shape. Hopefully I can demo i … | Continue reading


@chris.eidhof.nl | 8 months ago

Working With UIViewRepresentable

When we work with SwiftUI, we can always drop down to UIKit level by using UIViewRepresentable, NSViewRepresentable or UIViewControllerRepresentable. The documentation around these protocols is still pretty sparse, and it can be hard to get them to work exactly the way we want. I … | Continue reading


@chris.eidhof.nl | 8 months ago

Weeknotes № 36

It feels like last week was the last warm week of summer, and so as a family, we took advantage of that every afternoon and went swimming in one of the lakes nearby. Our new house is a short walk to one of those lakes, and one of my dreams since we moved here half a year ago was … | Continue reading


@chris.eidhof.nl | 8 months ago

Weeknotes № 35

We finally recorded the final bits of our keyframe reimplementation, including a Catmull-Rom implementation that turned out to be extremely simple and matches exactly what SwiftUI does. I’ve used our reimplementation in a macOS 13 app successfully. We also went over the entire b … | Continue reading


@chris.eidhof.nl | 8 months ago

Running Code When Your View Appears

When you’re writing SwiftUI views, you definitely don’t want to run expensive tasks in the view’s initializer, as it might get called very often. Also, since the view doesn’t have structural identity yet at that point, you can’t reliably store data. Instead, you want to load data … | Continue reading


@chris.eidhof.nl | 8 months ago

How To Visualize The Safe Area

When we draw a SwiftUI view on screen, it only fills the safe area by default. For example, here we can see a yellow rectangle that fills the safe area, but leaves white space at the top and bottom of the screen. Rectangle() .fill(Color.yellow) We can change this behavior … | Continue reading


@chris.eidhof.nl | 8 months ago

Weeknotes № 34

Last week we prepared and recorded more episodes about our SwiftUI keyframe reimplementation effort. I also worked on getting closer to the Catmull-Rom version that SwiftUI has implemented, but I’m not quite there yet. It’s close enough to be unnoticable, but I always feel like p … | Continue reading


@chris.eidhof.nl | 8 months ago

Weeknotes № 33

After last week’s conference in Toronto I went to NYC to get the most out of the transatlantic flight. The kind folks at iOSoho gave me a stage as well. After spending so long on preparing my talk (I didn’t track the time, but my guess is that it easily adds up to two weeks full- … | Continue reading


@chris.eidhof.nl | 9 months ago

Weeknotes № 29-32

The last weeks we’ve mostly enjoyed our holiday (visiting the Baltic sea), spent time in the garden, and generally took it easy. I finished the keyframe implementation, I think it’s almost the same as the native implementation but it works on older platforms. It’s not efficient … | Continue reading


@chris.eidhof.nl | 9 months ago

Weeknotes № 28

Last week we put the finishing touches to the animation chapter, and recorded a bunch of episodes to cover the summer break. I worked a bit on my talk as well. For our keyframe reimplementation, we also wanted to have cubic bezier timing curves. This was interesting to implement … | Continue reading


@chris.eidhof.nl | 10 months ago

Weeknotes № 27

We spent most of last week getting the animation chapter ready for our Thinking in SwiftUI prerelease. Of all the chapters in our book this had the most additions for iOS 17. Phase animations, keyframe animations, completion handlers, custom animation curves, new transition APIs … | Continue reading


@chris.eidhof.nl | 10 months ago

Weeknotes № 26

We were busy last week getting the layout chapter out, which is probably the chapter I’m most proud of. There’s still a lot more we could say about SwiftUI’s layout behavior, but I think it’s long enough already. We put a lot of effort into the explanations, I especially like the … | Continue reading


@chris.eidhof.nl | 10 months ago

Weeknotes № 25

Last week, we had the post-launch week of our book, which is always fun. It’s nice to see the first feedback, which has been good so far. We also released a new chapter on state and binding. This one already has a bunch of (hopefully) helpful custom diagrams in there that show ho … | Continue reading


@chris.eidhof.nl | 10 months ago

Weeknotes № 24

We went over the chapters of our book and tried to make an inventory of what we need to add. Most significantly, - the state chapter needs to describe the new way that object observing works, and the animations chapter needs a number of additions. We then prepared everything for … | Continue reading


@chris.eidhof.nl | 11 months ago

Weeknotes № 23

Last week was WWDC week. Hard to miss, the Vision Pro was announced. I’m excited and worried about that device. I especially didn’t like the dad wearing the goggles to take videos of his kids. I already worry about myself (and others) using their phones and other devices too much … | Continue reading


@chris.eidhof.nl | 11 months ago

Weeknotes № 22

I modified our attributed-string-builder to accept modifiers that can be applied to SwiftUI environment. For example, this lets us modify the environment for all embeds inside an AttributedStringConvertible. So far, the library has been really useful, and we’ve gotten really far … | Continue reading


@chris.eidhof.nl | 11 months ago

Weeknotes № 21

We prepared and recorded episodes that reimplement the core data structures of Git in Swift (without any third-party dependencies). The model of Git is really simple — I think it’s beautiful. In the episodes we recorded everything is read-only, but I managed to get writing to wor … | Continue reading


@chris.eidhof.nl | 11 months ago

Weeknotes № 20

We added a whole lot more diagrams to the book. One thing we struggled with is how to visually separate certain parts, and how to relate them to the text. One of the things we are now able to do is color our text inline (or apply any other attributes). Our Markdown renderer now u … | Continue reading


@chris.eidhof.nl | 12 months ago

Weeknotes № 19

We spent last week iterating on the book, mostly drawing diagrams. Because our understanding of SwiftUI has gotten much better since the previous release, we also have much better explanations and much better visuals. We also had to change some things in the underlying infrastruc … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 18

For our book, I added support to draw nicer diagrams (with overlays on the arrows placed in exactly the right spot). I also changed the syntax highlighting so that we can generate custom attributed strings for certain parts. You can see both parts in action in this post. We also … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 17

We spent a lot of time working on laying out our book, and are getting much closer now. Even though we were “80%” done already, getting all the details right takes a lot of time and tweaking: We added internal links to the book We added warnings for widows and orphans … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 16

At the start of the week, I worked on making our (private) SwiftUI library for drawing tree diagrams a bit simpler. It has code for both drawing the diagrams as well as parsing the type of a view and turning that into an interactive diagram. I separated that into two packages and … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 15

In Germany everyone gets time off for easter, and we spent time with friends and family. We also planted a bunch more things, really looking forward to summer where we’ll have a lot of fresh vegetables. We’re trying out a bunch of new things, so excited to see how well everything … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 14

I worked a bit on porting some “older” features we had in our test implementation of attributed string builder, and added them to our public repository. We’re planning to use that for publishing our book. We want back and forth a lot, but we believe it’s easier to work with our o … | Continue reading


@chris.eidhof.nl | 1 year ago

When Matched Geometry Effect Doesn't Work

One of the SwiftUI APIs that always kept confusing me is matchedGeometryEffect. I often thought I could use it but couldn’t figure out exactly how to make it work, always getting weird effects. I tried to distill the problematic code down to the essence: struct ContentView: View … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 13

We spent a lot of last week moving our stuff, culminating on Friday where we had to actually leave our old place. This was pretty stressful with two kids running around, and the oldest getting pretty sick at the beginning of the week. But we managed, all of our stuff is in the ba … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 12

Last weekend, we spent the entire sunny weekend around our new house, and with my 5-yo daughter we tackled a whole bunch of small projects: building some walls, sorting out wood, and building and planting our first raised bed. We recorded a few Swift Talk episodes on Monday, and … | Continue reading


@chris.eidhof.nl | 1 year ago

Weeknotes № 11

This week we managed to send over all our remaining chapters except for the introduction to technical review. At the last minute, we added a section about coordinate spaces and anchors. In thinking about this, we realized that anchors are purely convenience, it really seems to be … | Continue reading


@chris.eidhof.nl | 1 year ago