Problem with 'collapsed' property in NSSplitViewItem
Problem with 'collapsed' property in NSSplitViewItem
- Subject: Problem with 'collapsed' property in NSSplitViewItem
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 07 Aug 2015 08:31:38 -0400
I am having difficulty setting up NSSplitViewController and NSSplitViewItem, introduced in OS X 10.10 Yosemite.
Specifically, the 'collapsed' property of NSSplitViewItem does not return true after the bottom split view item of my horizontal split view collapses. I have set the 'canCollapse' property to true, and as a result double-clicking the divider does collapse the bottom split view item. I implemented the NSSplitViewDelegate -splitViewDidResizeSubviews: delegate method to test the 'collapsed' property of the bottom split view item and the 'hidden' property of its view -- 'hidden' returns true but 'collapsed' returns false.
All this happens whether or not I override the NSSplitViewDelegate delegate methods that are implemented in NSSplitViewController, such as -splitView:shouldCollapseSubView:forDoubleClickOnDividerAtIndex:. Implementing the delegate method appears to be nothing more than an alternative to setting the 'canCollapse' property. Is this right?
I also installed a "Collapse" button whose action method toggles the 'collapsed' property. This works perfectly.
Can anybody confirm this is a bug in NSSplitViewItem, or suggest what I might have misunderstood about the proper use of these classes?
--
Bill Cheeseman - email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden