cocologics/ShareInspector

Layout issues with multiline text and cell reuse(?)

Opened this issue · 1 comments

ole commented

Some table cells with text (TextCell) are not always laid out correctly. This seems to happen especially when a cell is reused and its new content is longer (more lines) than it was before. But I'm also seeing it when I rotate an iPhone from portrait to landscape, which shouldn't trigger cell reuse as far as I know.

Steps to reproduce:

  1. Select a number of photos in Photos.app (10 to 20) and share them to Share Inspector.

    Ideally, there should be a few HEIC and Live Photos in the mix because those will cause Photos to provide multiple type identifiers, making the registeredTypeIdentifiers field multiline.

  2. Scroll through the table and observe the cell layout. Is everything correct?

  3. Rotate the device from portrait to landscape? Are cell layouts correct after rotation?

I added a hack that a cell gets reloaded (hopefully triggering relayout) when you tap it, but that's not a good solution.

IMG_3160

ole commented

It seems to work correctly when I disable dynamic switching between vertical and horizontal stacking (depending on the text length in the two labels). So that seems to be the source of the issue, not the self-sizing table cells per se.