UILabel文本问题在iPhone [英] UILabel text Issue in iphone

查看:91
本文介绍了UILabel文本问题在iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有动态字符串数据的标签,例如:我是Mohit。我想只用粗体制作am。它可能在iphone中吗?如果是,请给我建议。提前谢谢:)

I have one label which have a Dynamic string data e.g: "I am Mohit" .I want to make only "am" in bold.Is it Possible in iphone? if yes please give me suggestion.Thanks in advance:)

推荐答案

不能在标准UILabel中找不到不同风格的文本。您可能需要使用的是 NSAttributedString 以及一些显示它们的自定义解决方案。查看此问题以了解一些可能的选项。

No you can't have text with different styles in standard UILabel. What you'll probably need to use is NSAttributedString and some custom solution to display them. Check this question for some possible options.

这篇关于UILabel文本问题在iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆