ios - How to keep auto-sized table cells format consistent after edition/deletion of rows using UIKit? -


i have simple table view unique label cell prototype. have been following recommendations in order have proper auto-sizing cells:

  • setting auto-layout constraints label regarding leading, trailing, top , bottom spacing in content view,
  • setting rowheight property uitableviewautomaticdimension,
  • providing estimatedrowheight property (set 44),
  • setting number of lines label 0.

i have enabled default edit mode allows reordering , deletion of rows (exactly in alarm tab of apple clock app).

now, on observed problem:

  1. i provide 2 labels, 1 short text , second longer text, second row has twice height of first row.

enter image description here

  1. i enter edit mode, , swap position of rows. far, keeps composure , sizing still correct, longer label being in top row.
  2. when swap positon again return original layout (short label on top , long label on bottom), longer text not spread on 2 lines in row should, turns one-line display ellipsis @ end. moreover, height of cell remains same , not fit single-lined text.

enter image description here

and after exitting edit mode (compare first image):

enter image description here

i suspect might missing kind of reload operation after moving or deletion of rows, did not find relevant information. similar sizing problems appear when deleting rows have been reordered.

how keep cell sizing text formatting consistent after moving/deletion of rows?

thank much.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -