iPhoto-style sidebar

2019-07-09 04:23发布

问题:

I'm trying to achieve this "effect" in cocoa (photo taken from Things.app from Cultured Code):

回答1:

PXSourceList makes creating a source list very easy.



回答2:

Try using an NSTableView or NSOutlineView with the selection style set to source list:

[outlineView setSelectionHighlightStyle: NSTableViewSelectionHighlightStyleSourceList]

Then create a custom NSCell class that displays your icon and text.