1. @kaishin onPreferenceChange() did not change 😉 It always required Equatable (how would it detect changes otherwise!). What did change though, is that Anchor no longer conforms to Equatable 😕

    — The SwiftUI Lab (@SwiftUILab) August 3, 2019

    I previously assumed that onPreferenceChange(_:perform:) added the Equatable requirement, but it turns out that Anchor<Value> dropped its Equatable conformance instead, as pointed out by @SwiftUILab and the official documentation.

    A curious change, regardless.

  2. Undocumented View Preference Changes in Beta 5

    Update: My assumption was wrong. Corrected here.

    I haven’t seen this mentioned anywhere, but the onPreferenceChange(_:perform:) view instance method now requires the preference key value type to conform to Equatabale as of Beta 5.

    In practice, this means that oPreferenceChange can no longer be used with preference keys that have an Anchor<Value> as their value type or a as a property of their value type, since Anchor itself doesn’t conform to Equatable. I fixed this by passing the GeometryProxy instance to a custom view modifier that unpacks the anchor first using the provided proxy, then passes the result as a CGFloat instead.

    For more on preference keys and anchors check out this informative blog post series.

  3. My Screen Time breakdown for last week. The time I used to spend on Twitter and Mastodon has shifted to reading, writing, and—ahem—browsing Reddit.

    Screen Time Summary

  4. Hello, world.

    Not long ago, I started toying with the idea of rolling out a custom-built microblog instead of relying on third party platforms. Today, I am happy to launch a modest first iteration.

    I will keep my single-user Mastodon instance and Twitter for the time being, but I will use them mainly to syndicate posts that will be published here first.