Skip to content

Commit 7271b5e

Browse files
committed
修复了可能只刷新高度 导致显示界面时候无法显示
1 parent 8936d48 commit 7271b5e

7 files changed

Lines changed: 174 additions & 160 deletions

File tree

.DS_Store

4 KB
Binary file not shown.

ZHTableViewGroupExample/ZHTableViewGroupExample.xcodeproj/project.pbxproj

Lines changed: 134 additions & 152 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>$(CURRENT_PROJECT_VERSION)</string>
21+
</dict>
22+
</plist>

ZHTableViewGroupExample/ZHTableViewGroupObjc/ZHTableViewCell.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ - (BOOL)isHiddenDisplayWithIndexPath:(NSIndexPath *)indexPath {
7070

7171
- (BOOL)isHiddenWithIndexPath:(NSIndexPath *)indexPath {
7272
BOOL isHidden = self.hiddenBlock && self.hiddenBlock(indexPath);
73-
[self setHidden:isHidden indexPath:indexPath];
7473
return isHidden;
7574
}
7675

ZHTableViewGroupExample/ZHTableViewGroupObjc/ZHTableViewDataSource.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ + (UITableViewCell *)cellForRowAtWithDataSource:(ZHTableViewDataSource *)dataSou
7676
if (!resultCell) {
7777
return cell;
7878
}
79+
ZHTableViewCell *tableViewCell = [group tableViewCellForIndexPath:indexPath];
80+
NSIndexPath *realIndexPath = [group indexPathWithCell:tableViewCell indexPath:indexPath];
81+
BOOL isHidden = [tableViewCell isHiddenWithIndexPath:realIndexPath];
82+
cell.hidden = isHidden;
83+
[tableViewCell setHidden:isHidden indexPath:realIndexPath];
7984
return resultCell;
8085
}
8186

ZHTableViewGroupExample/ZHTableViewGroupObjc/ZHTableViewGroup.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ - (UITableViewCell *)cellForTableViewWithTableView:(UITableView *)tableView inde
6767
return nil;
6868
}
6969
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:tableViewCell.identifier];
70-
NSIndexPath *realIndexPath = [self indexPathWithCell:tableViewCell indexPath:indexPath];
71-
BOOL isHidden = [tableViewCell isHiddenWithIndexPath:realIndexPath];
72-
cell.hidden = isHidden;
7370
if (config) {
7471
[self tableViewCell:tableViewCell
7572
configCell:cell

ZHTableViewGroupExample/ZHTableViewGroupObjc/ZHTableViewGroupObjc.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22
// ZHTableViewGroupObjc.h
33
// ZHTableViewGroupObjc
44
//
5-
// Created by 张行 on 2018/6/7.
6-
// Copyright © 2018年 张行. All rights reserved.
5+
// Created by 张行 on 2020/2/29.
6+
// Copyright © 2020 josercc. All rights reserved.
77
//
88

9-
#import "ZHTableViewDataSource.h"
10-
#import "ZHCollectionViewDataSource.h"
9+
#import <Foundation/Foundation.h>
10+
11+
//! Project version number for ZHTableViewGroupObjc.
12+
FOUNDATION_EXPORT double ZHTableViewGroupObjcVersionNumber;
13+
14+
//! Project version string for ZHTableViewGroupObjc.
15+
FOUNDATION_EXPORT const unsigned char ZHTableViewGroupObjcVersionString[];
16+
17+
// In this header, you should import all the public headers of your framework using statements like #import <ZHTableViewGroupObjc/PublicHeader.h>
18+
19+

0 commit comments

Comments
 (0)