摘要: 下面是代码,被注释掉的是原来的代码,指定颜色不生效。NSMutableAttributedString *attriString = [[[NSMutableAttributedStringalloc] initWithString:string] autorelease]; NSRange range; range.location = 4; range.length = nameString.length; [attriString removeAttribute:(NSString *)kCTFontAttributeNamerange:range]; if ([SYSTEM_... 阅读全文
posted @ 2013-11-01 20:05 一个人去流浪 阅读(1590) 评论(0) 推荐(0) 编辑
摘要: 之前想改的时候一直没找到对应的函数,以为不能改。偶尔在stackoverflow看到了解决方式,代码如下:[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"AmericanTypewriter" size:20.0f],UITextAttributeFont,[UIColor yellowColor],UITextAttributeTextColor,[UIColor redColor],UIT 阅读全文
posted @ 2013-11-01 11:51 一个人去流浪 阅读(473) 评论(0) 推荐(0) 编辑