如何隐藏nssplitview的分隔线? [英] How to hide a divider of nssplitview?

查看:561
本文介绍了如何隐藏nssplitview的分隔线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我想隐藏或显示与我的条件分隔符,当我的应用程序运行。使用此委托方法:

Now I want to hide or show with my condition a divider when my app run. used this delegate method:

- (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex
{
   if (A) 
       return YES;
   else 
       return NO;
}

但它没有工作,为什么?如何使用这种方法?非常感谢!

but it didn't work , why? How to used this method? Thank you very much!

推荐答案

拆分视图将该消息发送给其委托,询问代理是否应隐藏该分隔符。因此,是代表,并回答拆分视图的问题。

The split view sends that message to its delegate, to ask the delegate whether it should hide that divider. So, be the delegate, and answer the split view's question.

请务必查看文档。这可能是那个消息不会实现你想要的。该文档列出了您可以通过回复该邮件所做的一切。

Be sure to check out the documentation. It's possible that that message won't accomplish what you want it to. The documentation lists everything you can do by responding to that message.

这篇关于如何隐藏nssplitview的分隔线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆