I have an NSTableView (view Based) who show info's from an NSarrayController. All connections are made from IB. Everything works fine, but blue selection color doesn't look ok with my design idea, so I want to change this color with my own color, but until now I failed.
class MyTable: NSTableView, NSTableViewDelegate {
override func drawBackgroundInClipRect(clipRect: NSRect) {
if self.isRowSelected( self.selectedRow ){
//NSColor.brownColor().colorWithAlphaComponent(0.9).setFill()
// NSBezierPath.fillRect(clipRect)
println("selected")
}
}
}
My real problem is that: I have no idea where should I start, what to subclass, NSTableView , NSTableCellView etc.
Recent I discovered a method to do that which say I should subclass NSTableRowView, and override drawSelectionInRect function. I've did that, but in IB i don't have an NSTableRowView Object.
Thanks.