Skip to content
This repository was archived by the owner on Nov 23, 2021. It is now read-only.
This repository was archived by the owner on Nov 23, 2021. It is now read-only.

Manage func itemViewModel(fromModel model: ModelType) -> ItemViewModelType? { into class ModelPickerViewModel  #3

@Andreoid82

Description

@Andreoid82
func itemViewModel(fromModel model: ModelType) -> ItemViewModelType? {
    switch model {
        //Example to customize picker for particular models
    //case let model as Product : return ListItemViewModel(product: model)
    case let model as ModelWithTitle : return ListPickerElementItemViewModel(model: model)
    default : return model as? ItemViewModelType
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions