Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 NSOutlineView 的子类,它使用 View 作为单元格(我使用 TextField)。问题是我可以简单地更改 IB 中行的颜色来更改 TextFieldCell 颜色,但我不能在代码中这样做。谁能帮我?谢谢!
经过大量研究,我发现解决方案是覆盖该NSOutlineView方法- (void)highlightSelectionInClipRect:(NSRect)theClipRect并绘制您的自定义突出显示。
NSOutlineView
- (void)highlightSelectionInClipRect:(NSRect)theClipRect