我有带有 2 个文本列的基于视图的 NSTableView。
第一列使用自定义 NSTextFieldCell。第二列使用默认单元格。
这是自定义单元格代码:
class CustomTextFieldCell: NSTextFieldCell {
// don't do anything, just call the super implementation
override func drawInterior(withFrame cellFrame: NSRect, in controlView: NSView) {
super.drawInterior(withFrame: cellFrame, in: controlView)
}
}
不知何故,自定义(第一)列中的文本字段看起来不同(更薄?)。这是屏幕截图(塞拉)。
不确定发生了什么,可能是自定义实现使用了不同的抗锯齿设置。
我在那里想念什么?先感谢您。
编辑:提到基于视图的 NSTableView