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 …
After yesterday’s wrap up of my fix for vibrant table views, I have discovered that NSSplitViewItem
has 3 initializer variants since macOS 10.11: The latter will not add vibrancy. Guess who, by accident, discovered his table view to be wrapped in a init(sidebarWithViewController:)
call.
Continue reading …
I discovered my own idiocy and found that I overlooked which initializer of NSSplitViewItem
was called. Apparently, the sidebar-related one adds vibrancy by default. Dealing with un-vibrancifying a table view might still be interesting, so I leave this up.
Continue reading …
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 …
For quite a while I didn’t notice Sequence.first(where:)
exists. It’s like first
, only with a condition. Proposed and implemented by Russ Bishop, by the way. I have now happily migrated from my self-baked findFirst
to this method – only to find out today that there’s not last(where:)
equivalent.
Continue reading …
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 …