p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
span.s1 { color: #703daa }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ba2da2; background-color: #ffffff }
span.s1 { color: #703daa }
span.s2 { color: #3e1e81 }
span.s3 { color: #d12f1b }
span.s4 { color: #78492a }
span.s5 { color: #272ad8 }
span.s6 { color: #4f8187 }
span.s7 { color: #000000 }
UIImageView *userHeaderImageView = [[UIImageView alloc]init];
userHeaderImageView.image = [UIImage imageNamed:@"point_red.png"];
userHeaderImageView.frame = CGRectMake(WIDTH - 65, 5, 60, 20);
[cell.textLabel addSubview:userHeaderImageView];
return cell;
}
其实就是新建一个UIImageView 之后添加在textLabel 就可以了。非常简单。
原文地址:https://www.cnblogs.com/lanmaokomi/p/8508866.html