fattjake
fattjake

Reputation: 116

NSTableViewHeaderView not drawing over NSScroller

I've got a custom NSTableHeaderView of custom NSTableHeaderCell objects that draw a custom header. The problem I'm having is that when the NSScroller bars show up, the header drawn above the scroller is the default, not my custom drawing.

enter image description here

Upvotes: 2

Views: 254

Answers (2)

Vikram Sinha
Vikram Sinha

Reputation: 609

Mac Mojave Left Corner View

Recently when providing support for one of my application on Mac Mojave I find out the culprit behind the top left corner view of table view. this can also be removed if we will set the corner view from xib like below.

This issue produces if Automatically Hide Scroller property is set to YES and no corner view has been set

patch showing on top left corner of table view

Solution:

setting corner view property

Upvotes: 0

fattjake
fattjake

Reputation: 116

Turns out the view that controls this section (over the scroller, right side of header) is called cornerView and the NSTableView has a -setCornerView:(NSView *)view method to set it. I fixed my problem by subclassing NSView and using custom drawing to draw a corner image into the view, then setting that subclass using the previously mentioned method.

Upvotes: 1

Related Questions