A description of this package.
Supports only iOS 13 and above
- Model
Response.swift
is visible to client. All - View
DemoLibrary.swift
and itsinitializer
are available for public interface. - ViewModel
LibraryViewModel
andinitializer
are also available to public for passing the data to library required for rendering required views.
Create an instance of model CreditScore
and pass it to DemoLibrary
view's initializer as dependency.
import DemoLibrary
var body: some View {
DemoLibrary(withViewModel: LibraryViewModel(withResponse: CreditScore(), inLandscape: false))
}
Library follows MVVM design pattern.
- View has reference of its ViewModel, not vice-versa
- ViewModel has reference to Model,m not vice-versa
- View holds
no
reference to Model and vice-versa