Don’t forget to register nib as cell in viewDidLoad. We also set estimateItemSize for UICollectionViewFlowLayout to (1,1) because flowLayout will use auto sizing via auto layout when estimate item size has been set (This is the common pitfall).
Let’s go back and take a higher look at the figure above. In general, the ViewModel receives the user interaction from the View, fetches data from the Model, then process the data to a set of ready-to-display properties. The View updates itself after observing the change of the ViewModel. That’s the whole story of the MVVM.