我想知道如何从代码中为 NSOutlineView 的树节点的展开/折叠设置动画?
// this works ok but doesn't animate
NSTreeNode *node = [self.outlineView itemAtRow:self.outlineView.clickedRow];
if([self.outlineView isItemExpanded:node])
{
[self.outlineView.animator collapseItem:node];
}else{
[self.outlineView.animator expandItem:node];
}
如果您通过默认绘制的箭头扩展节点,大纲视图自然会动画,
所以有一种方法......