[英]How to Hide Divider when NSSplitView subview is Collapsed?
OK, here's my problem : 好,这是我的问题:
I've been using DMSplitView for some NSSplitView
manipulation. 我一直在使用DMSplitView进行某些
NSSplitView
操作。 However when the rightmost view is collapsed, the divider (even if it's being pushed to the right) is still visible (yep, you might consider it an exaggeration but I still keep noticing that 1px line at the right of the window). 但是,当最右边的视图合拢时,分隔线(即使向右推动)仍然可见(是的,您可能会认为它是夸张的,但我仍然注意到窗口右侧的1px线)。
Is there any way to make it disappear? 有什么办法可以使其消失?
Any ideas? 有任何想法吗?
The solution was rather simple. 解决方案非常简单。
Just implement - (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex
somewhere inside DMSplitView.m
and makes sure it behaves as you wish. 只需在
DMSplitView.m
内的某个地方实现- (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex
并确保其行为符合您的DMSplitView.m
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.