Skip to content

Commit 5b5cc11

Browse files
foxsofterfoxsofter
authored andcommitted
tableViewModel bug
1 parent f0c876c commit 5b5cc11

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

LPDTableViewKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'LPDTableViewKit'
11-
s.version = '0.2.0'
11+
s.version = '0.2.1'
1212
s.summary = 'LPDTableViewKit, data driven tableview'
1313

1414
# This description is used to generate tags and improve search results.

LPDTableViewKit/Classes/LPDTableView.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ @implementation LPDTableView
2020

2121
- (void)bindingTo:(__kindof id<LPDTableViewModelProtocol>)viewModel {
2222
NSParameterAssert(viewModel);
23+
24+
self.sectionHeaderHeight = 0.1;
25+
self.sectionFooterHeight = 0.1;
2326

2427
self.viewModel = viewModel;
2528

LPDTableViewKit/Classes/LPDTableViewModel.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,10 +1051,6 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
10511051
return UITableViewAutomaticDimension;
10521052
}
10531053

1054-
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForHeaderInSection:(NSInteger)section {
1055-
return 1.f;
1056-
}
1057-
10581054
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
10591055
id<LPDTableSectionViewModelProtocol> sectionViewModel = self.viewModel.sections[section];
10601056
if ([sectionViewModel respondsToSelector:@selector(headerViewModel)]) {
@@ -1065,10 +1061,6 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSIntege
10651061
return .1f;
10661062
}
10671063

1068-
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForFooterInSection:(NSInteger)section {
1069-
return 1.f;
1070-
}
1071-
10721064
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
10731065
id<LPDTableSectionViewModelProtocol> sectionViewModel = self.viewModel.sections[section];
10741066
if ([sectionViewModel respondsToSelector:@selector(footerViewModel)]) {

0 commit comments

Comments
 (0)