标签:
NSMutableAttributedString *noteStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"作品:%@",data[@"works_num"]]];
NSRange redRange = NSMakeRange(0, [[noteStr string] rangeOfString:@":"].location);
[noteStr addAttribute:NSForegroundColorAttributeName value:COLOR_9999COLOR range:redRange];
[_productLabel setAttributedText:noteStr] ;
[_productLabel sizeToFit];
//获取内容高度 判断高度的大小 改变其他控件的坐标
CGFloat heigh1 = [Unit heightWithString:_synopsisLab.text
font:_synopsisLab.font
constrainedToWidth:_synopsisLab.width];
_synopsisLab.height = heigh1;
synopsisBackView.height = _synopsisLab.height+73;
标签:
原文地址:http://www.cnblogs.com/liaolijun/p/5486383.html