samedi 30 avril 2016

How to design a ViewController with complex TableView

Imagine this scenario:

  • I've 10 different and custom UITableViewCell: one with a textfield, one with a button, one with some labels, one with a textview, one with an imageView and so on.
  • I've a ViewController with a tableView where I wanna display these cells.
  • The number of cell displayed can vary based on some conditions (and also the height, the background color and other parameters)
  • The user can interact with these cells


What is the best way to design this in respect of the MVC and maintain the ViewController lightweight and maintainable as possible?
How to take advantage of Swift language in doing this?
Is there any famous and consolidate design pattern to apply?

Aucun commentaire:

Enregistrer un commentaire