Peter Chen

  • About
  • iOS
  • ML
  • Design

Table View Custom Cell Insertion Animation

Sep 10, 2017

To add a custom table view cell insertion animation (ex. a springy animation + alpha 0 to 1):

Store the index paths that need the custom insertion animation. Insert the index paths into your data model. Insert the index paths into the table view with no animation. Create a custom animation method in your custom table cell. Call that method from tableView(_:willDisplay:forRowAt:). Clear the stored index paths.

#ios #tableview #cell