How to Expand a Synology SHR‑0 Volume to the Full Size of a New Disk After Converting from SHR‑1

After converting a Synology SHR‑1 (mirrored) volume to SHR‑0 (single-disk), you will likely want to expand your storage pool to use the extra capacity of the new disk you originally mirrored with. Here’s a step-by-step guide using SSH and command-line tools to safely resize your volume. Note: This guide assumes you have already converted Read more

Understanding context.environment in SwiftUI’s UIViewRepresentable

This blog post was written with the assistance of ChatGPT. When integrating UIKit components into SwiftUI using UIViewRepresentable, you might come across the context.environment property. While it looks simple on the surface, it hides a powerful mechanism: environment-driven updates. In this post, we’ll explore what context.environment does, how SwiftUI tracks it, and how it can cause Read more

How to use withObservationTracking to monitor an @Observable

Reposted from: https://forums.swift.org/t/how-to-use-observation-to-actually-observe-changes-to-a-property/67591/18 I thought I’d share an example of how I am currently using it. I wanted to make an object that maintains a sorted order of the main model’s objects. I used withObservationTracking to update if either the sort order local to this object is changed or if the particular Read more