Creating a label using NSTextField is blurry

后端 未结 8 1229
后悔当初
后悔当初 2021-01-06 03:05

I\'m trying to create a label programmatically using NSTextField, but it comes out blurry: screenshot

This is my code so far:

NSTextfield *textfield          


        
8条回答
  •  甜味超标
    2021-01-06 03:37

    Try this below:

    textField.drawsBackground = true
    textField.backgroundColor = NSColor.white.withAlphaComponent(.leastNormalMagnitude)
    

提交回复
热议问题