0 Replies
      Latest reply on Feb 12, 2020 4:42 PM by gaussblurinc
      gaussblurinc Level 1 Level 1 (0 points)

        The problem:

        1. You have UITableView with UITableView.automaticDimension for cell height.

        2. You have a simple cell, that embed UITextView into .contentView.

        3. UITextView, of course, disables its scroll.


        Question:
        How to expand/change cell size by using only UITableViewDiffableDataSource?


        Actual:

        In documentation object (MyViewModel) that represents view model for a corresponding cell, should conform to Hashable protocol. It is done for "diffing" on "Array" concept level ( operations as Insert and Delete ).

        How to react on update operations in this case?

        NOT a solution:

        I found in a blog post that I have to call tableView.begin/end updates on text did changed.
        It is a hack.
        However, it works as expected and I would like to hear different solutions and appropriate patterns about Diffable datasource.

        Thanks!