设置UILable特定的字为特定的颜色

   NSMutableAttributedString *showStr = [[NSMutableAttributedString alloc] initWithString:@"微信搜索V积分就能找到我们"];

    [showStr addAttribute:NSForegroundColorAttributeName value:kUIColorFromRGB(0xed1f24) range:NSMakeRange(4, 3)];

    showLable2.attributedText = showStr;

posted @ 2014-11-24 11:07  DreamStartGirl  阅读(227)  评论(0编辑  收藏  举报