TOInsetGroupedTableView icon indicating copy to clipboard operation
TOInsetGroupedTableView copied to clipboard

Problem when separator inset is 0

Open HasanKassem opened this issue 5 years ago • 1 comments

When the separator inset is set to 0, the cell has rounded corners knowing that there is another cell under it.

HasanKassem avatar May 15 '20 18:05 HasanKassem

Hi @HasanKassem!

Yep. That's expected. The code that controls that is here: https://github.com/TimOliver/TOInsetGroupedTableView/blob/7c8848c6c35bf9417706a822f291ddc30c7a91e2/TOInsetGroupedTableView/TOInsetGroupedTableView.m#L319

As far as I've managed to think this through, there's no way to tell the difference between when a cell is displaying its separator view in order to separate it from the cell below, or if it's actually the last one in that section. The only difference is that the cell separators are inset, and the section separators span the entire length (And their X value is 0.0). If you set the inset value to be 0.0, we lose the ability to tell them apart.

Thinking about it now, there MIGHT be a way to hack it. If you set the cell separator inset to be less than 0 (eg, like -1), we could then modify that code to check for that and disregard.

TimOliver avatar May 16 '20 04:05 TimOliver