如何在 iPad 上设置 NSAttributedString 的颜色?

发布于 2024-09-08 14:39:18 字数 143 浏览 2 评论 0原文

我看到很多与彩色文本相关的问题都用“查看 NSAttributedString”来回答,但是为 Mac OS 定义的 NSForegroundColorAttributeName 常量似乎没有定义适用于 iOS 3.2+

I've seen a lot of questions related to colored text answered with "check out NSAttributedString", but the NSForegroundColorAttributeName constant that is defined for Mac OS does not seem to be defined for iOS 3.2+

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

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

发布评论

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

评论(1

深白境迁sunset 2024-09-15 14:39:19

请改用 kCTForegroundColorAttributeName 常量。

Use the kCTForegroundColorAttributeName constant instead.

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