How to remove space between cells NSTableView?

I set the cell spacing in my NSTableView to 0 by sending:

[self.tableView setIntercellSpacing:NSMakeSize(0, 0)]; 

in the awakeFromNib window controller, but there is still (possibly 1 pixel) empty space between the lines, which in my opinion is where the grid lines are drawn, although I do not use grid lines. How can I get rid of this space between the lines?

update:

The NSTableView documentation seems to say that this 1-pixel split should disappear when the gateway is set to 0, 0. In my case, it is not. Maybe this is a mistake?

+8
cocoa nstableview macos
source share
1 answer

As trudyscousin suggested, I will post how I fixed my problem:

As it turned out, the empty space really disappears when you set the cell spacing to 0, like me. My problem was that the drawing code in my NSTableCallView subclass did not draw completely to the edge of the view. The break I saw was not a gateway, it was the border of my subclass of NSTableCellView.

+2
source share

All Articles