【问题标题】:Change direction of disclosure triangle改变披露三角形的方向
【发布时间】:2011-09-28 07:44:38
【问题描述】:

如何以编程方式更改显示三角形的方向? 在 Interface Builder 中,可以通过将值“Control -> Layout”从“从左到右”或“从右到左”更改。

我制作了一个 NIB 文件的差异。唯一的变化是NSCellFlags2

这是否记录在任何地方?

【问题讨论】:

    标签: objective-c cocoa nsbutton nscell


    【解决方案1】:

    您要查找的方法是-[NSCell setUserInterfaceLayoutDirection:]。您需要获取对相应单元格的引用,然后向其发送适当的消息。例如,考虑disclosureButton 指向该披露按钮:

    [[disclosureButton cell] setUserInterfaceLayoutDirection:NSUserInterfaceLayoutDirectionRightToLeft];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-08
      相关资源
      最近更新 更多