Brett Walker

@petsound
56 Followers
65 Following
84 Posts

iOS developer, musician, writer, sham


Looking for full-time and freelance work (LA or remote)!

github: https://github.com/poetmountain

apps: https://www.brettwalker.net

New to the Observation framework, transactional observations, consumable via an AsyncStream? Seems like a good stepping stone for replacing Combine in async situations. Sadly Observations is not available in beta 1...
Was able to build an example project for this, narrowed it down to using a type constraint on a sub-protocol which conforms the type to a concrete class. Passing in self is specifically what triggers the type equivalency error. Still not sure if this is a compiler bug or just bad code. (filed FB17074007, cc: @holly )
Suddenly getting this compiler error on my Destinations lib in Xcode 16.3. I'm certainly open to this being the compiler being smarter about telling me my code is bad, but at first glance this doesn't make a lot of sense as they're the same generic types.

Well I finally got around to adding visionOS support to MotionMachine. Because it's built from the ground up as a generic animation library, it's relatively easy to do things like add animations to the RealityKit objects you see here.

I just threw this together as a test, but part of this animation even uses a PathMotion as a guide for each ball Entity, grabbing point values along CGPaths.

https://github.com/poetmountain/MotionMachine

GitHub - poetmountain/MotionMachine: A powerful, elegant, and modular animation library for Swift.

A powerful, elegant, and modular animation library for Swift. - poetmountain/MotionMachine

GitHub

So much stuff that I couldn't tell you everything in MotionMachine 2.2 in one post!

The other big feature in this release is the physics engine powering PhysicsMotion and PathPhysicsMotion now supports simple collision handling using fixed start and end points. It's also gained a restitution property to let you tweak the elasticity (bounce energy) when colliding.

So you can create animations like this:

It's about time I released a new feature for my Swift animation library MotionMachine, and this is a big one. You can now animate a point along a CGPath!

PathMotion is an A to B animation using an easing equation. PathPhysicsMotion uses a physics engine.

* Animate along whole path or a portion of it
* Plays well with other MotionMachine classes - reverse, repeat, put them in groups, sequences
* Includes a CPU performance mode for complex paths

https://github.com/poetmountain/MotionMachine

GitHub - poetmountain/MotionMachine: A powerful, elegant, and modular animation library for Swift.

A powerful, elegant, and modular animation library for Swift. - poetmountain/MotionMachine

GitHub
And to create that action, this presentation is created at app launch. The user interaction type is paired with this, and Destinations does the rest. It's so easy to change stuff around like this.
As a reminder, the sidebar buttons in the above example have no idea that they are updating content in another column. It is literally just this, passing in a user interaction type and a content model to the Destination state. UI work becomes a lot more fun when navigation is no longer hardcoded into the UI.

Destinations 1.1.0 has been released and now supports split views! Both UISplitViewController on UIKit and NavigationSplitView on SwiftUI can now have content presented in their columns with the new "splitView" presentation type.

https://github.com/poetmountain/Destinations

GitHub - poetmountain/Destinations: A Swift library for UIKit and SwiftUI designed to manage navigation flow, abstract datasource requests, and decouple UI from app logic.

A Swift library for UIKit and SwiftUI designed to manage navigation flow, abstract datasource requests, and decouple UI from app logic. - poetmountain/Destinations

GitHub