iOS 11 UITableView bug

后端 未结 2 1284
甜味超标
甜味超标 2021-01-31 19:51

The bug can be reproduced using the repo here.

I have a strange bug affecting my project in iOS 11 in my UITableView. The TableView in question is grouped, has expandabl

2条回答
  •  情书的邮戳
    2021-01-31 20:18

    In iOS 11, all the estimated UITableView properties (estimatedRowHeight, estimatedSectionHeaderHeight, and estimatedSectionFooterHeight) default to UITableViewAutomaticDimension.

    I see that for your cells that's fine as you're returning UITableViewAutomaticDimension in heightForRow. For your section headers and footers however you aren't utilizing the auto-sizing. I would try disabling all the auto-sizing behavior in your headers/footers by setting estimatedSectionHeaderHeight, and estimatedSectionFooterHeight to 0.

    Source: iOS 11 Floating TableView Header

提交回复
热议问题