macOS Storyboard Outlet-Like Connections Between View Controllers

Transitioning from Nibs to Storyboards poses a few challenges. One of them being creating outlets from a parent view controller to a child view controller. There is no such thing. You could say this is the new idiomatic way to create interfaces, but I don’t quite agree with the consequences. How do you pass data to a view controller 4 levels deep in the hierarchy? It’s not obvious. And there are no “embed” segues like you have them on iOS to obtain references.

Continue reading …

ReSwift Niceties: The Current State Getter

When you have a reference to your store of ReSwift.StoreType, you can use the current state property to get to a value directly. This means you don’t even need to make the object a store subscriber to grant access to some store state. I don’t recommend doing this in real code, of course. This is just like any global variable and comes with the usual problems.

Continue reading …

The 3 RxSwift Building Blocks of UI Components

So here’s what I learned so far about the building blocks of reactive UI components from peeking at the RxCocoa source. UI components in general can have properties (read/write), input ports (read), and output ports (write). Classic UIKit/AppKit output ports would be delegate calls; classic input ports would be commands like display(banana:) that you probably write every day or so.

Continue reading …