NSString * string = [NSString stringWithFormat:@"您的号码是%@号",[self backString:dic[@"rankNumbe ...
NSAttributedString的初始化方法有: initWithString:用String初始化,并没有Attributed信息。 initWithAttributedString:用AttributedString去初始化。 initWithString:Attributed:用string及attribute的dictionary来初始化。 具体AttributtedString属性 ...
2015-09-07 11:02 0 4530 推荐指数:
NSString * string = [NSString stringWithFormat:@"您的号码是%@号",[self backString:dic[@"rankNumbe ...
//带有属性的文字 //1.创建对象 NSString *original = @"今天你还好吗?"; NSMutableAttributedString *attrTitle = [[NSMutableAttributedStringalloc ...
在ANSI终端下可以显示彩色代码: 如 printgf(“33[01;40;32m HELLO 33[01;40;37m”); 能显示绿色的HELLO字样。 printf("\033[0;32mPASSED\033[0;0m\n"); printf("\033 ...
格式: echo -e "\033[字背景颜色;字体颜色m字符串\033[0m" 例如: echo -e "\033[41;36m something here \033[0m" 其中41的位置代表底色, 36的位置是代表字的颜色 那些ascii code 是对颜色调用的始末. \033[ ; m ...
转自:http://my.oschina.net/CarlHuang/blog/138363 在项目开发中,我们经常会遇到在这样一种情形:在一个UILabel 使用不同的颜色或不同的字体来体现字符串,在iOS 6 以后我们可以很轻松的实现这一点,官方的API 为我们提供了UILabel类 ...
默认b蓝色; 八中内建颜色: b:blue 蓝色 g:green 绿色 r:red 红色 c:cyan 青色 m:magenta 品红 y:yellow 黄色 k:black 黑色 w:white 白色 其它三种表示方法 ...
一、字符串概述 二、字符串长度 三、转义字符&字符串对象 四、字符串截取 五、字符串查找 六、字符串替换 七、字符串其他操作方法 八、拓展 ...