是否可以在UILabel中设置多种颜色? [英] is it possible to set multiple color in UILabel?

查看:99
本文介绍了是否可以在UILabel中设置多种颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自Jason Coco的报价
不可能在UILabel中设置多个...但是

Quote from Jason Coco it not possible to set multiple in UILabel... but

这样做怎么办?

任何想法?

是否可以在UILabel中设置混合颜色

is it possible to set mix color in UILabel

示例测试
我可以将E设置为红色而另一个设置为白色吗?

example "TEST" can i set E to red color and another to white color?

推荐答案

不,可悲的是这不是可以使用UILabel。你可以谷歌一些替代品,iPad将有NSAttributedString,但使用UILabel,整个字符串必须是一种字体/颜色。

Nope, sadly this is not possible with UILabel. You can google some alternatives and the iPad will have NSAttributedString, but with UILabel the entire string has to be one font/color.

这篇关于是否可以在UILabel中设置多种颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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