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
propertyuitableviewautomaticdimension
, - 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:
- i provide 2 labels, 1 short text , second longer text, second row has twice height of first row.
- i enter edit mode, , swap position of rows. far, keeps composure , sizing still correct, longer label being in top row.
- 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.
and after exitting edit mode (compare first image):
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
Post a Comment