Jonathan
Jonathan
Aug 28, 2017 · 1 min read

I’ve implemented most of these since I started maintaining a project with huge tableview VCs.

Currently I’ve started using a sort of container where each row/cell is just a collection of class type (ExampleCell) and the data it should have applied.

So a simple example would be to setup a tableview like this

[TableData addCell:[TextCell class] data:@”sometext”]

This is then automatically used in the (or all) tableview controllers by creating or reusing each cell automatically in the superclass.

Cells then set themselves up automatically as the ‘data’ is applied on cellForIndexPath. Makes having multiple cells in a view trivial and I haven’t set stuff up manually for a very long time.

)

    Jonathan

    Written by

    Jonathan