使用 NSViewController 导入 Nib 文件时,文字看起来不流畅

发布于 2025-01-01 04:16:51 字数 441 浏览 7 评论 0原文

我正在使用 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:

enter image description here

The text just doesn't look anti-aliased. In xCode all the labels are looking bad too. What could be wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

檐上三寸雪 2025-01-08 04:16:51

好吧,我已经找到了解决问题的方法。只需为您遇到问题的视图禁用“核心动画层”即可。您可以在“查看效果检查器”下找到此复选框。现在文本看起来又平滑了。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文