How can I correctly use associatedType in my protocol
问题 I’m trying to come up with an protocol-oriented MVVM for my tableviewcells. I have lots of them. my viewModel protocol PlainTableViewCellModelType { var backgroundColor : UIColor {get} var textColor: UIColor {get} var titleFont : UIFont {get } var accessoryType : UITableViewCellAccessoryType {get} var textLabelNumberOfLines: Int {get} } my view protocol PlainTableViewCellType{ associatedtype viewModel : PlainTableViewCellModelType func setupUI(forViewModel viewModel: viewModel) } my class