I subclassed NSTableRowView
in view-based NSTableView
to change the selection color to a lighter blue instead of the default one.
Unfortunately when I select the row the color of the labels and textfields inside my custom cell turns white and it's not readable.
How can I prevent text from changing color on selection?
Solution Found:
All I had to do is to implement -setBackgroundStyle:
in my custom NSTableCellView
and there call the setBackgroundStyle:NSBackgroundStyleLight
on the NSCell
of all the controls I want to keep dark on selection.