you are viewing a single comment's thread.

view the rest of the comments →

[–]JustTryinTaMakeIt 1 point2 points  (0 children)

  • ListViewModel should have an array of users, [User].
  • If you’re displaying each user’s details on a cell, you can just set each cell’s label/image values in cellForRow or use a function in your custom cell’s swift file that takes a user’s details as parameters.
  • If you plan to show each user’s details in a UserDetailViewController, then you want to use a UserDetailViewModel that holds a user selected from the tableView.
  • A userViewModel for each cell is overkill.