Any help in solving this compilation error.
I have this protocol
protocol PresenterProtocol {
associatedtype V: UIView
associatedtype VM
var view: V? { get set }
func stateToViewModel(with state: State) -> VM
}
and this class implementing it
class Presenter: PresenterProtocol {
var view: UIView?
}
then this line
presenter.view = UIView()
produces this compilation error
Cannot assign value of type 'UIKit.UIView' to type 'UIKit.UIView'
What is
Component
? I knowUIView
is not related toComponent
as far as I can see. Why did you expect this to work?Component is a UIView, so if you think this should not work, what r the reasons