@@ -259,11 +259,17 @@ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
259
259
260
260
#pragma mark Table header footer
261
261
- (CGFloat )tableView : (UITableView *)tableView heightForHeaderInSection : (NSInteger )section {
262
- return section == 0 ? 1.0 /[UIScreen mainScreen ].scale : _curTopic.watchers .count > 0 ? 152 : 98 ;
262
+ return section == 0 ? 1.0 /[UIScreen mainScreen ].scale : _curTopic.watchers .count > 0 ? 142 : 88 ;
263
263
}
264
264
265
265
- (CGFloat )tableView : (UITableView *)tableView heightForFooterInSection : (NSInteger )section {
266
- return 1.0 /[UIScreen mainScreen ].scale ;
266
+ return section == 0 ? 10 : 1.0 /[UIScreen mainScreen ].scale ;
267
+ }
268
+
269
+ - (UIView *)tableView : (UITableView *)tableView viewForFooterInSection : (NSInteger )section {
270
+ UIView *footerV = [UIView new ];
271
+ footerV.backgroundColor = kColorTableSectionBg ;
272
+ return footerV;
267
273
}
268
274
269
275
- (UIView *)tableView : (UITableView *)tableView viewForHeaderInSection : (NSInteger )section {
@@ -498,7 +504,6 @@ - (instancetype)init
498
504
self = [super init ];
499
505
if (self) {
500
506
__weak typeof (self) weakSelf = self;
501
- self.backgroundColor = kColorTableSectionBg ;
502
507
if (!_contentView) {
503
508
_contentView = [UIView new ];
504
509
_contentView.backgroundColor = kColorTableBG ;
@@ -572,8 +577,7 @@ - (instancetype)init
572
577
[self .contentView addSubview: _deleteBtn];
573
578
}
574
579
[_contentView mas_makeConstraints: ^(MASConstraintMaker *make) {
575
- make.left .right .bottom .equalTo (self);
576
- make.top .equalTo (self).offset (10 );
580
+ make.edges .equalTo (self);
577
581
}];
578
582
[_watchersL mas_makeConstraints: ^(MASConstraintMaker *make) {
579
583
make.left .equalTo (_contentView).offset (kPaddingLeftWidth );
0 commit comments