Here's an example of MVVM architecture in Swift:
Model - User.swift
main.swift59 chars5 linesView - UserProfileViewController.swift
main.swift567 chars22 linesViewModel - UserProfileViewModel.swift
main.swift415 chars21 linesIn summary, the View is responsible for displaying data and user interaction, the ViewModel is responsible for preparing data for presentation and responding to user interaction, and the Model is responsible for representing the data.
gistlibby LogSnag