I am looking to remove the separator color in View based NSTableView
.
It looks like this :
For UITableView there is a method setSeparatorColor:
but not for NSTableView.
Solutions will be highly appreciated.
I am looking to remove the separator color in View based NSTableView
.
It looks like this :
For UITableView there is a method setSeparatorColor:
but not for NSTableView.
Solutions will be highly appreciated.
I did this as:
Changed the Intercell spacing to :
[aTableView setIntercellSpacing:NSMakeSize(0, 0)];
And changed the height of the the cell, set view's width to 30.f
, the cell being drawn is of 35.f
.
Now it is perfect, screen shot :
For NSTableView
, Interface Builder has settings for Horizontal Grid
, Vertical Grid
, and Grid Color
. These are reflected in the API as -setGridStyleMask
and setGridColor
.
They do exactly what you want.
[table setGridColor:[NSColor clearColor]];
[table setGridStyleMask:NSTableViewGridNone];
Maybe I could mention that in view based tables NSTableRowView is responsible for drawing the seperators. So in the inspector for the table you set it the grid to "None" and implement drawSeparatorInRect:
in your NSTableRowView subclass, which in your case would mean leaving it empty.