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