An iOS architectural design pattern called MVVM (Model View View-Model) breaks items into three basic components.
A new component, ViewModel, is added to the MVC design pattern, allowing the view controller's responsibility to be simplified and the business logic to be handled by the ViewModel instead of the view controller.
As an alternative to MVC's hefty controller, MVVM provides a solution. It adds a fourth component, called ViewModel, to the system. For data manipulation activities, a ViewModel is responsible, and it manages the model by transferring its data to the view controller. Wherever we need to change models into a different representation for a view, this approach can be applied. A date object, for example, can be transformed into formatted text using the view model, as can a decimal number into formatted currency text. This design works well with MVC. By introducing another component, the goal is to reduce the function of a view controller. It is still necessary to have outlets and inject the formatted data into the view controller.