. , , , , , :
-(void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item {
NSUInteger rowNo = [outlineView rowForItem:item];
NSColor *backgroundColor;
if ( [[outlineView selectedRowIndexes] containsIndex:rowNo] ) {
backgroundColor =
}
else {
backgroundColor =
}
[cell setBackgroundColor: backgroundColor];
}
, , .
, , outlineView:dataCellForTableColumn:item:.
NSButtonCell *cell = [[NSButtonCell alloc] init];
[cell setBezelStyle:NSRegularSquareBezelStyle];
[cell setButtonType:NSToggleButton];
[cell setBordered:NO];
[cell setTitle:@""];
[cell setImage:[NSImage imageNamed:@"green.png"]];
[cell setAlternateImage:[NSImage imageNamed:@"red.png"]];
[cell setImagePosition:NSImageOverlaps];