【发布时间】:2012-04-27 09:57:21
【问题描述】:
嗨,我有一个 NS TexView:
[risultato setString:[NSString stringWithFormat:@"%@\n<Ricetta>\n\t<numero>%@</numero>\n\t<fbimage>http://www.aletrnativeindustries.it/piccole_ricette/%@.png</fbimg>\n\t<foto>%@.png</foto>\n\t<nome>%@</nome>\n\t<dose>X%@</dose>\n\t<tempo>%@</tempo>\n\t<ricetta>%@</ricetta>\n</Ricetta>\n", prec, number, photo, photo, title, dos, time, ric]];
risultato.textColor = [NSColor redColor];
在最后一条指令中,我将所有颜色更改为红色,但如果我希望某些文本保持黑色? 我需要那个 prec,数字,照片,照片,标题,dos,时间,摆脱保持黑色。 prec, number.... 是 NSString。
【问题讨论】:
标签: xcode nstextview