Search code examples
macoscocoaosx-lionnsoutlineview

Custom View-Based NSOutlineView disclosure?


Is there a simple way to customize the disclosure triangle for expandable items?

I tried removing it and calling [outlineView expandItem:X] when my custom disclosure indicator was clicked, but all the sexy built-in animations didn't work. Is there a trick to enable those animations? I tried [outlineView beginUpdates] but that yielded no results either.


Solution

  • Use the animator:

    [[[outlineView] animator] expandItem:xyz]