Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos NSOutlineView:&x27;大纲视图:RowByItem的高度:';与设置行高动画相比_Macos_Cocoa_Animation_Nsoutlineview - Fatal编程技术网

Macos NSOutlineView:&x27;大纲视图:RowByItem的高度:';与设置行高动画相比

Macos NSOutlineView:&x27;大纲视图:RowByItem的高度:';与设置行高动画相比,macos,cocoa,animation,nsoutlineview,Macos,Cocoa,Animation,Nsoutlineview,我有NSOutlineView,其中的行高度可变(在运行时)。使用委托中的outlineView:heightOfRowByItem:方法立即更改高度非常简单。但是我想在展开/折叠动画期间设置行高度动画 如何做到这一点?在您的NSOutlineView通话中: 这将根据outlineView:heightOfRowByItem:delegate方法返回的新高度设置行的动画 从文件中: 对于基于视图的表,此方法将设置动画。 […] 对于基于单元格的表,此方法通常不会设置动画。但是,如果在Begin

我有
NSOutlineView
,其中的行高度可变(在运行时)。使用委托中的
outlineView:heightOfRowByItem:
方法立即更改高度非常简单。但是我想在展开/折叠动画期间设置行高度动画


如何做到这一点?

在您的
NSOutlineView
通话中:

这将根据
outlineView:heightOfRowByItem:
delegate方法返回的新高度设置行的动画

从文件中:

对于基于视图的表,此方法将设置动画。
[…]
对于基于单元格的表,此方法通常不会设置动画。但是,如果在BeginUpdate/endUpdates块内调用它,它将具有动画效果


谢谢绝对是我需要的。
// index set with all rows that did change height
NSIndexSet *rows = [NSIndexSet indexSetWithIndex:1];
[self.outlineView noteHeightOfRowsWithIndexesChanged:rows];