Search code examples
objective-cmacosnstableviewnsoutlineview

Prevent NSTableView / NSOutlineView from separating cells


I have a Mac app with a view-based NSOutlineView. The outline view seems to separate its rows so the background color of the nearest ancestor view with a background shows through. How do I prevent this? I've already set grid style to none.


Solution

  • I figured it out. There's a method called setInterCellSpacing on NSTableView that separates the cells. Mine was set to non-zero values. Set it to NSZeroSize and the issue goes away.