Note that there are some explanatory texts on larger screens.

plurals
  1. USFrancesco
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COIf I use `sizeWithFont:` instead of `sizeWithFont:constrainedToSize:lineBreakMode:` all cell heights get calculated as if the labels were 1-lined, no matter how long the text is/how many lines it has. Guessing the constrainedToSize doesn't make much sense since in most cases the guess won't match the label's final width, and therefore the calculated cell height might be wrong...
      singulars
    2. COSorry for the delay.Actually this was almost what I had just before my question. The only difference is that I calculated the difference of rows between the old and the new fetch result and added/deleted rows accordingly. This worked out. But I felt that this wouldn't be 'right' - doing the heavy stuff 'by foot' and leaving the built-in features more or less unused. Hence my question. To follow your request: without having it tested I'm pretty sure your suggested update method would work. So, you'll get the checkmark (even though the answer isn't what I hoped to hear ;)
      singulars
    3. COI'm using autolayout and it does adapt the labels' sizes. But as far I can say from testing the size adaption happens after the cells' sizes a calculated. This in turn means that I don't have any information about the final label sizes/widths when doing the math in `tableView:heightForRowAtIndexPath`. So how to work around this? I'm wondering that I am the only one trying to solve this problem. It seems to me to be a pretty common task...
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload