iPhoto-style sidebar

2019-07-09 03:46发布

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

alt text

2条回答
beautiful°
2楼-- · 2019-07-09 04:10

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.

查看更多
做个烂人
3楼-- · 2019-07-09 04:17

PXSourceList makes creating a source list very easy.

查看更多
登录 后发表回答