0

I'd like to create the content lists in the style of the Finder window's left pane (similarly in the style Mail/iTunes/etc). Currently my NSTableView/NSOutlineView implementation looks a little basic.

Is there any tutorial that can help me mimic the Apple look? In particular, I'm after the header rows, the colours, etc.

Monolo
  • 18,205
  • 17
  • 69
  • 103
jkcl
  • 2,141
  • 3
  • 16
  • 19
  • possible duplicate of [Is there a standard, documented, development pattern to create UI layouts similar to iTunes, iCal, iPhoto, etc?](http://stackoverflow.com/questions/6934036/is-there-a-standard-documented-development-pattern-to-create-ui-layouts-simila) – Rob Keniger Nov 13 '11 at 11:56

2 Answers2

1

You need to get a source list first: setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList

You can get those really cool headers by implementing a delegate method: - (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row or the NSOutlineView counterpart: - (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item.

[myOutlineView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList];
- (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item {
    return [self itemIsGroupItem:item];
}

This would get you the selection gradient, blue background, etched header rows, etc.

Alex Zielenski
  • 3,591
  • 1
  • 26
  • 44
0

You should have a look at PXSourceList, it has the Apple look & feel.

0xced
  • 25,219
  • 10
  • 103
  • 255