jflinter / Dwifft

Swift Diff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SingleSectionTableViewDiffCalculator setting animations doesn't work

MaximusMcCann opened this issue · comments

Need to have the underlying table dif animations set. Perhaps:

public final class SingleSectionTableViewDiffCalculator<Value: Equatable> {

    /// The table view to be managed
    public weak var tableView: UITableView?

    /// All insertion/deletion calls will be made on this index.
    public let sectionIndex: Int

    /// You can change insertion/deletion animations like this! Fade works well.
    /// So does Top/Bottom. Left/Right/Middle are a little weird, but hey, do your thing.
  public var insertionAnimation = UITableViewRowAnimation.automatic {
    didSet {
      internalDiffCalculator.insertionAnimation = insertionAnimation
    }
  }
  
  public var deletionAnimation = UITableViewRowAnimation.automatic {
    didSet {
      internalDiffCalculator.deletionAnimation = deletionAnimation
    }
  }

... more code