答案 0 :(得分:4)
我遇到了与NSTextField类似的问题......我通过继承NSTextField并将CG上下文的setShouldSmoothFonts参数设置为false来修复它。像这样:
class MyOutlineView: NSOutlineView {
override func draw(_ dirtyRect: NSRect) {
let context = NSGraphicsContext.current()?.cgContext
context!.setShouldSmoothFonts(false)
super.draw(dirtyRect)
}
}