I'm trying to make a simple view-based NSTableView
with groups and regular cells. Every cell is drawn correct and shows everything I need unless I add this method to my NSTableViewDelegate/DataSource
:
func tableView(tableView: NSTableView, isGroupRow row: Int) -> Bool {
return (tableContent[row] as NSDictionary)["group"] != nil
}
It works just fine, but cells that become group cells show nothing. I've tried it on different cell types, but still nothing, just a semi-transparent gray background. Even if I add something like
override func drawRect(dirtyRect: NSRect) {
NSColor(calibratedRed: 0, green: 255, blue: 0, alpha: 1).setFill()
NSRectFill(dirtyRect)
super.drawRect(dirtyRect)
// Drawing code here.
}
to my group cell class I'll get only a semi-transparent gray background.