File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
LayoutOps/LayoutOps/UIKit Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ public final class TableViewNodesDisplayAdapter {
4343 }
4444
4545 public func tableView( _ tableView: UITableView , heightForFooterInSection section: Int ) -> CGFloat {
46- return footerNodeSequence. size ( for: section, size: CGSize ( width: tableView. bounds. size. width, height: 0 ) ) . height
46+ let h = footerNodeSequence. size ( for: section, size: CGSize ( width: tableView. bounds. size. width, height: 0 ) ) . height
47+
48+ if isAlmostEqual ( left: h, right: 0 ) {
49+ return CGFloat . leastNormalMagnitude
50+ } else {
51+ return h
52+ }
4753 }
4854
4955 public func tableView( _ tableView: UITableView , willDisplayFooterView view: UIView , forSection section: Int ) {
@@ -57,7 +63,13 @@ public final class TableViewNodesDisplayAdapter {
5763 }
5864
5965 public func tableView( _ tableView: UITableView , heightForHeaderInSection section: Int ) -> CGFloat {
60- return headerNodeSequence. size ( for: section, size: CGSize ( width: tableView. bounds. size. width, height: 0 ) ) . height
66+ let h = headerNodeSequence. size ( for: section, size: CGSize ( width: tableView. bounds. size. width, height: 0 ) ) . height
67+
68+ if isAlmostEqual ( left: h, right: 0 ) {
69+ return CGFloat . leastNormalMagnitude
70+ } else {
71+ return h
72+ }
6173 }
6274
6375 public func tableView( _ tableView: UITableView , willDisplayHeaderView view: UIView , forSection section: Int ) {
You can’t perform that action at this time.
0 commit comments