使用 NSViewController 导入 Nib 文件时,文字看起来不流畅
我正在使用 NSViewController 导入单独的 nib 文件。在我的 windowController 中,使用以下代码加载 nib:
_schedulesViewController = [[SchedulesViewController alloc] initWithNibName:@"Schedules" bundle:nil];
[_inspectorView addSubview:[_schedulesViewController view]];
存在一个问题:计划 nib 文件中的文本看起来不流畅。似乎存在缩放问题。这是屏幕截图:
文本看起来没有消除锯齿。在 xCode 中,所有标签看起来也很糟糕。可能出什么问题了?
I'm importing a seperate nib file using a NSViewController
. In my windowController, the nib is loaded using the following code:
_schedulesViewController = [[SchedulesViewController alloc] initWithNibName:@"Schedules" bundle:nil];
[_inspectorView addSubview:[_schedulesViewController view]];
There is one problem: the text from the schedules nib file doesn't look smooth. It seems that there is a scaling problem. Here's a screen capture:
The text just doesn't look anti-aliased. In xCode all the labels are looking bad too. What could be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我已经找到了解决问题的方法。只需为您遇到问题的视图禁用“核心动画层”即可。您可以在“查看效果检查器”下找到此复选框。现在文本看起来又平滑了。
Oke I have found the solution to my problem. Just disable 'Core Animation Layer' for the view you have problems with. You can find this checkbox under the View Effects Inspector. Now the text looks smooth again.