ra1028 / Carbon

🚴 A declarative library for building component-based user interfaces in UITableView and UICollectionView.

Home Page:https://ra1028.github.io/Carbon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected behaviour with section headers

pedrommcarrasco opened this issue Β· comments

Checklist

Hey @ra1028 πŸ‘‹
First of all, congrats on such a great project! I've been playing with Carbon lately and I think I managed to find a nasty issue with UITableView section headers or maybe I'm doing something wrong πŸ€”

Expected Behavior

Show all section headers and allow self-sizing

Current Behavior

  • First section header is not displayed
  • Self-sizing doesn't seem to work

Detailed Description (Include Screenshots)

  • Expected (with standard UITableView code)

Screenshot 2019-11-14 at 10 43 59

  • What I get with Carbon

Screenshot 2019-11-14 at 10 43 57

Sample Project:

Test.zip

Environment

  • Carbon version: What's currently in master

  • Swift version: 5.1

  • iOS version: 13.2

  • Xcode version: 11.2

  • Devices/Simulators: iPhone 11 Pro

  • CocoaPods/Carthage version: Not applicable (Swift Package Manager)

Hi @pedrommcarrasco,
Thanks for your valuable reporting and sample project!

What I learned from your test app is that it works correctly when I set a value that is NOT UITableView.automaticDimension to estimatedSectionHeaderHeight.
This will probably happen if component don't have a referenceSize at here.
Fix it by returning a larger value if automaticSizing is set.

I'll fix this soon.
Thanks!