@@ -60,6 +60,21 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
6060 [self .contentView addSubview: _privateIconView];
6161 }
6262
63+ if (!_ownerTitleLabel) {
64+ _ownerTitleLabel = [UILabel new ];
65+ _ownerTitleLabel.textColor = [UIColor colorWithHexString: @" 0x999999" ];
66+ _ownerTitleLabel.font = [UIFont systemFontOfSize: 11 ];
67+ [self .contentView addSubview: _ownerTitleLabel];
68+ }
69+
70+ [_ownerTitleLabel mas_makeConstraints: ^(MASConstraintMaker *make) {
71+ make.height .equalTo (@(14 ));
72+ make.width .equalTo (@(200 ));
73+ make.left .equalTo (self.privateIconView );
74+ make.bottom .equalTo (_projectIconView.mas_bottom );
75+ }];
76+
77+
6378 if (!_pinIconView) {
6479 _pinIconView = [[UIImageView alloc ] initWithImage: [UIImage imageNamed: @" icon_project_cell_setNormal" ]];
6580 _pinIconView.hidden = YES ;
@@ -108,7 +123,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
108123
109124
110125 [_starV mas_makeConstraints: ^(MASConstraintMaker *make) {
111- make.bottom .equalTo (_projectIconView );
126+ make.bottom .equalTo (_ownerTitleLabel. mas_top ). offset (- 3 );
112127 make.left .equalTo (_privateIconView);
113128 make.centerY .equalTo (@[_starL, _watchV, _watchL, _forkV, _forkL]);
114129 make.width .height .equalTo (@[_watchV, _forkV, @12 ]);
@@ -151,25 +166,36 @@ - (void)setProject:(Project *)project hasSWButtons:(BOOL)hasSWButtons hasBadgeTi
151166
152167 [_projectTitleLabel mas_updateConstraints: ^(MASConstraintMaker *make) {
153168 make.top .equalTo (_projectIconView.mas_top );
154- make.height .equalTo (@(25 ));
169+ make.height .equalTo (@(20 ));
155170 make.left .equalTo (_privateIconView.mas_right ).offset (_privateIconView.hidden ?0 :8 );
156171 make.right .lessThanOrEqualTo (self.mas_right );
157172 }];
158173
159174 [_describeLabel mas_updateConstraints: ^(MASConstraintMaker *make) {
160175 make.left .equalTo (self.privateIconView );
161- make.height .equalTo (@(40 ));
176+ make.height .equalTo (@(38 ));
162177 make.width .equalTo (@(kScreen_Width -kLeftOffset -kIconSize -kLeftOffset ));
163178 make.top .equalTo (_projectTitleLabel.mas_bottom );
164179 }];
165180
166181
167- // Title & description & star & watch &fork
182+ // Title & description & star & watch &fork &owner+update_time
168183 _projectTitleLabel.text = _project.name ;
169184 _describeLabel.text =_project.description_mine ;
170185 _starL.text = _project.star_count .stringValue ;
171186 _watchL.text = _project.watch_count .stringValue ;
172187 _forkL.text = _project.fork_count .stringValue ;
188+
189+ NSString *titleStr=[NSString stringWithFormat: @" %@ 最后更新于 %@ " ,_project.owner_user_name,[_project.updated_at stringDisplay_HHmm ]];
190+ NSMutableAttributedString *titleColorStr=[[NSMutableAttributedString alloc ] initWithString: titleStr];
191+ [titleColorStr addAttribute: NSForegroundColorAttributeName value: [UIColor colorWithHexString: @" 0x3bbd79" ] range: [titleStr rangeOfString: _project.owner_user_name]];
192+ //
193+ // [titleColorStr addAttribute:NSForegroundColorAttributeName value:ZZBThemeOrangeColor range:[titleStr rangeOfString:aPerson.text]];
194+ // _nameLabel.text = [NSString stringWithFormat:@"%@(%ld)", _folder.name, (long)(_folder.count.integerValue)];
195+ // _infoLabel.text = [NSString stringWithFormat:@"%@ 创建于 %@", _folder.owner_name, ];
196+
197+ _ownerTitleLabel.attributedText = titleColorStr;
198+
173199
174200 // hasSWButtons
175201 [self setRightUtilityButtons: hasSWButtons? [self rightButtons ]: nil
0 commit comments