Creating a label using NSTextField is blurry

后端 未结 8 1219
后悔当初
后悔当初 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:34

    Since this was my first time subclassing NSView, I had put the above code in the drawRect method instead of the initWithFrame method. I did this because I was following one of the sample applications from Apple's Dev site.

    This was also causing my CPU usage to spike when I was scrolling

提交回复
热议问题