Cocoa:自定义NSTableHeaderView高度和背景颜色

时间:2015-08-10 14:46:20

标签: macos cocoa nstableheaderview

我尝试更改NSTableHeaderView的高度,高度已更改,但背景上有一块白色。这是我的代码:

    for subView:NSView in topScrollView.subviews {
        for subSubView:NSView in subView.subviews {
            if (subSubView is NSTableHeaderView) && (subView is NSClipView) {
                subSubView.setFrameSize(NSMakeSize(subSubView.frame.size.width, subSubView.frame.size.height + 20))
                subView.setFrameSize(NSMakeSize(subView.frame.size.width, subView.frame.size.height + 20))
            }
        }
    }

和快照 enter image description here

感谢您的帮助〜

0 个答案:

没有答案