gpt4 book ai didi

objective-c - 自定义 NSPathControl

转载 作者:行者123 更新时间:2023-12-03 16:37:52 24 4
gpt4 key购买 nike

我想制作一个自定义的NSPathControlNSPathCell 具有方法 + pathComponentCellClass,您可以在其中返回组件单元格的自定义类。我有一个 NSPathComponentCell 子类,我直接返回该子类,但它不起作用。该方法不会被调用。为什么?

documentation是说:

Subclasses can override this method to return a custom cell class that is automatically used. By default, the method returns [NSPathComponentCell class], or a specialized subclass thereof.

如果这是错误的,是否有其他方法来自定义NSPathControl

最佳答案

我找到了解决方案并将其发布在github上。我从 NSPathControl 继承了子类。其实很简单。

关于objective-c - 自定义 NSPathControl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13368356/

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