2011-01-24 54 views
2

我有一个小问题nstextview,当我发送[textView setWantsLayer:YES]时,textView中的字体变得模糊,有人知道它为什么?字体问题与层支持NSTextView

[[textView enclosingScrollView] setDrawsBackground:NO]; 
[textView setDrawsBackground:NO]; 
[textView setWantsLayer:YES]` 

回答

4

这里的问题很可能是因为背景颜色是透明的,所以导致它在别的透明背景上看起来很糟糕。

一般而言,我发现只要我还[textView setDrawsBackground: YES]我可以[textView setWantsLayer: YES]并设置不透明的背景颜色。

祝你好运。