Is it possible to create a Finder-like sidebar on Tahoe using AppKit?

I'm using IB to create an NSOutlineView. I configure it:

[_outlineView setStyle:NSTableViewStyleSourceList]

I put it in an NSSplitView.

What I get is an old-style sidebar with a VisualEffect background and no rounded rect border.

That is likely a private API and would be rejected if submitted to the app store.

To get the standard sidebar design, instead of directly building a NSSplitView you must use the higher-level NSSplitViewController and create a split item using the sidebar behavior. There are straightforward ways to get this if you're assembling the UI in code or with a Storyboard, where it's configurable in the split item inspector.

If you're using xibs directly, you may need to do some assembly. Likely the easiest way is to do a xib per split, loading each one with a NSViewController, and then assemble those into a NSSplitViewController in code using the APIs I linked above. This bears some resemblance to what a Storyboard is doing for you automatically, so it might be simpler in the long run to adopt Storyboards for this.

I have done this programmatically in the suggested way, using a sidebar split view item, but the scroll edge effect is not applied unfortunately. Here is a simple example: https://git.sr.ht/~jonsterling/cocoa-bindings-template

Would you mind having a look to see what you think is going wrong? I prefer not to do this in a Storyboard (dealing with outline views and their cells in the storyboard leads to a lot of weird and unfixable misplacef frame warnings from Xcode—even in Apple’s sample projects! Hence I prefer a programmatic approach).

Is it possible to create a Finder-like sidebar on Tahoe using AppKit?
 
 
Q