Cocoa: Custom NSTableHeaderView height and background color

939 views Asked by At

I tried to change height for NSTableHeaderView,the height was changed,but there was a piece of white on the background.This is my code:

    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))
            }
        }
    }

and the snapshot enter image description here

Thanks for help~

0

There are 0 answers