|
27 | 27 | @interface ProjectTaskListViewCell () |
28 | 28 | @property (strong, nonatomic) UIImageView *userIconView, *commentIconView, *timeClockIconView, *mdIconView, *taskPriorityView; |
29 | 29 | @property (strong, nonatomic) UITapImageView *checkView; |
30 | | -@property (strong, nonatomic) UILabel *contentLabel, *userNameLabel, *timeLabel, *commentCountLabel, *mdLabel; |
| 30 | +@property (strong, nonatomic) UILabel *contentLabel, *userNameLabel, *timeLabel, *commentCountLabel, *mdLabel, *numLabel; |
31 | 31 | @property (strong, nonatomic) ProjectTaskListViewCellTagsView *tagsView; |
32 | 32 | @end |
33 | 33 |
|
@@ -74,6 +74,12 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus |
74 | 74 | _tagsView = [ProjectTaskListViewCellTagsView new]; |
75 | 75 | [self.contentView addSubview:_tagsView]; |
76 | 76 | } |
| 77 | + if (!_numLabel) { |
| 78 | + _numLabel = [UILabel new]; |
| 79 | + _numLabel.font = [UIFont systemFontOfSize:10]; |
| 80 | + _numLabel.textColor = [UIColor colorWithHexString:@"0x222222"]; |
| 81 | + [self.contentView addSubview:_numLabel]; |
| 82 | + } |
77 | 83 | if (!_userNameLabel) { |
78 | 84 | _userNameLabel = [UILabel new]; |
79 | 85 | _userNameLabel.font = [UIFont systemFontOfSize:10]; |
@@ -144,11 +150,16 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus |
144 | 150 | make.height.mas_equalTo(25); |
145 | 151 | make.right.equalTo(self.contentView).offset(-kPaddingLeftWidth); |
146 | 152 | }]; |
147 | | - [_userNameLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 153 | + [_numLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
148 | 154 | make.bottom.equalTo(self.contentView).offset(-10); |
149 | 155 | make.left.equalTo(self.userIconView.mas_right).offset(10); |
150 | 156 | make.height.mas_equalTo(15); |
151 | 157 | }]; |
| 158 | + [_userNameLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 159 | + make.left.equalTo(self.numLabel.mas_right).offset(5); |
| 160 | + make.centerY.equalTo(self.numLabel); |
| 161 | + make.height.mas_equalTo(15); |
| 162 | + }]; |
152 | 163 | [_timeClockIconView mas_makeConstraints:^(MASConstraintMaker *make) { |
153 | 164 | make.left.equalTo(self.userNameLabel.mas_right).offset(10); |
154 | 165 | make.centerY.equalTo(self.userNameLabel); |
@@ -206,8 +217,9 @@ - (void)layoutSubviews{ |
206 | 217 | _tagsView.hidden = YES; |
207 | 218 | } |
208 | 219 | //Bottom |
| 220 | + _numLabel.text = [NSString stringWithFormat:@"#%@", _task.number.stringValue]; |
209 | 221 | _userNameLabel.text = _task.creator.name; |
210 | | - _timeLabel.text = [_task.created_at stringDisplay_HHmm]; |
| 222 | + _timeLabel.text = [_task.created_at stringDisplay_MMdd]; |
211 | 223 | _commentCountLabel.text = _task.comments.stringValue; |
212 | 224 | _mdIconView.hidden = _mdLabel.hidden = !_task.has_description.boolValue; |
213 | 225 | } |
|
0 commit comments