具有特定颜色的特定字母?

时间:2014-11-19 05:46:07

标签: xcode swift xcode6 swift-playground generics

我想知道是否有办法在使用Swift编程语言着色的每个单词中写字母。我正在寻找想法和线索。

示例:

println("This is a string")

看起来像这样:

http://i.stack.imgur.com/IqxCh.png

只是有这个帮助,我发现其他语言能够通过javascript和microsoft字专门用颜色着色每个字母。我没有线索,任何会有所帮助。谢谢!

实施例: https://superuser.com/questions/230665/how-do-i-change-the-font-color-of-a-specific-letter-throughout-the-entire-ms-wor Is there any clean CSS method to make each letter in a word a different color?

1 个答案:

答案 0 :(得分:1)

假设您使用名为UILabel的{​​{1}}:

myLabel