如何将 2 种文本样式应用于 iPhone 中的标签

发布于 2024-10-06 09:19:25 字数 189 浏览 0 评论 0原文

我有一个桌面视图。在单元格中,我显示 xml 中的一些字符串数据。 在该字符串中,有一些斜体标签和一些普通标签。 但是当我尝试显示整个字符串时,它以普通文本显示,而不是斜体文本。 我尝试采用两个标签,一个带有斜体文本,另一个带有普通文本,然后附加这两个标签,但我将整个字符串设置为斜体。

我们如何在标签中应用两种样式

提前致谢

i have a tableview. in cell i am displaying some string data from xml.
in that string some italic tags and some normal tags r there.
but when i try to display the entire string it is displayed in normal text and not getting italic text.
i tried by taking 2 labels one with italic text and another with normal text and appending these 2 labels but i am getting entire string as italic.

how can we apply 2 styles in a label

Thanks in advance

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

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

发布评论

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

评论(1

浊酒尽余欢 2024-10-13 09:19:25

目前,UILabel 控件不支持“富文本”。在同一个 UILabel 中,不能同时使用斜体和普通文本。

Three20 有一个支持此功能的标签,但是:

http://api. Three20.info/interface_t_t_styled_text_label.php

Currently, the UILabel control does not support "rich text." You cannot have some text italic and some normal in the same UILabel.

Three20 has a label that supports this, however:

http://api.three20.info/interface_t_t_styled_text_label.php

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