标签:
代码:
-(void)setComplaintlistItem:(ComplaintlistItem *)complaintlistItem{
_complaintlistItem = complaintlistItem;
[self.yeZhuNameLabel setText:complaintlistItem.YzName];
[self.stateLabel setText:complaintlistItem.ComplaintStateName];
[self.appealContentLabel setAttributedText:[self makeAppealContent:complaintlistItem.Content]];
[self.dateTimeLabel setText:complaintlistItem.CreateTime];
}
-(NSMutableAttributedString *)makeAppealContent:(NSString *)rawContent{
NSString * content = [NSString stringWithFormat:@"申诉内容:%@",rawContent];
NSDictionary *headText = @{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UtilityHelper colorWithHexString:@"333333"]};
NSDictionary *normalText = @{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UtilityHelper colorWithHexString:@"666666"]};
NSMutableAttributedString * textAttributeStr = [[NSMutableAttributedString alloc]initWithString:content attributes:normalText];
[textAttributeStr addAttributes:headText range:NSMakeRange(0, 5)];
return textAttributeStr;
}
标签:
原文地址:http://www.cnblogs.com/Jordandan/p/5695929.html