任何方式使用NSLog打印颜色? [英] Any way to print in color with NSLog?
本文介绍了任何方式使用NSLog打印颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在典型的彩色终端中,有可以用来打印不同颜色文本的转义序列。通常有8种颜色可用。我尝试使用标准,ANSI转义序列为此在NSLog,但没有骰子。它不支持这种机制。
In a typical color terminal, there are escape sequences that one can use to print text in different colors. Typically there are 8 colors available. I tried using the standard, ANSI escape sequences for this in NSLog, but no dice. It does not support by that mechanism.
有没有不同的方式使用NSLog打印到控制台(日志)颜色?
Is there a different way to print to the console (log) in color using NSLog?
感谢。
推荐答案
您可以使用 Apple Color Emoji 为您的Log输出添加一些颜色,如下: / p>
You can use Apple Color Emoji to add some color to your Log output like this:
这篇关于任何方式使用NSLog打印颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文