Recent posts

  • Using KeyPaths to Drive Programmatic Focus

    The new focus API in iOS 15 is very nice. I have found using KeyPaths for settings and responding to focus changes is a helpful shortcut and avoids the additional boilerplate of defining a custom focus enum for every View.

    Read more
  • List Selection Based Navigation on macOS

    There are multiple ways to handle sidebar driven navigation on macOS with SwiftUI. I have found using a selection binding to be the most robust solution.

    Read more
  • Adding an @EnvironmentBinding PropertyWrapper

    We can easily pass and use mutable Observable objects to the environment but we are unable to do the same for Bindings. @EnvironmentBinding enables us to use binding based environment values with the same syntax as if they were passed to regular @Binding properties.

    Read more
  • Using the GPU for custom function evaluation without writing a metal shader.

    Sometimes our apps contain some heavy arithmetic work that would be ideal to run in parallel on our users GPUs. But we don't want to bother learning and implementing them in Metal. MPSGraph might give you the tools you need to evaluate your functions on the GPU without needing to pick up Metal.

    Read more