I want to replace RBSplitView
with NSSplitView
in my existing project. The application is now leopard only and I would like to replace RBSplitView
with the new NSSplitView
shipped with Leopard.
However, I'm missing RBSplitView
's handy methods expand
and collapse
in NSSplitView
. How can I expand and collapse parts of NSSplitView programmatically?
I tried the solution above, and found it did not work, as isSubviewCollapsed never returned YES
A combination of the suggestions yielded a result which works
In macOS Sierra, the
collapsed
property is changed toisCollapsed
. Is straight forward just setting the property totrue
orfalse
. The following code is from myWindowController
, where I have twoSplitViewItem
s.In swift this works
call this from IBAction, outline is an OutlineViewController with own xib and we need the view hence outline.view, keeping it simple but hope you get the idea
and
And implement delegate
And with 10.11 you might just use toggleSidebar action method. How to toggle visibility of NSSplitView subView + hide Pane Splitter divider? https://github.com/Dis3buted/SplitViewController
In El Capitan, this did the trick for me.