gpt4 book ai didi

objective-c - 禁用 NSOutlineView 的滚动动画

转载 作者:太空狗 更新时间:2023-10-30 04:00:06 25 4
gpt4 key购买 nike

有没有办法停止 NSOutlineView 的滚动动画。 “展开”是指展开/折叠项目时发生的动画,子项向下/向上滑动。

最佳答案

创建 NSOutlineView 的子类并抑制动画:

-(void) expandItem:(id)item expandChildren:(BOOL)expandChildren
{
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.0];

[super expandItem:item expandChildren:expandChildren];

[NSAnimationContext endGrouping];
}

其他方法有:

– expandItem:
– expandItem:expandChildren:
– collapseItem:
– collapseItem:collapseChildren:

关于objective-c - 禁用 NSOutlineView 的滚动动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22116527/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com