When I add the line to func bindMainView() - .assign(to: &imagePreview) I get the following error:
Cannot convert value of type ‘UIImage?’ to expected argument type
‘Published<UIImage>.Publisher’
I’ve gone over the code and everything looks good. If I replace .assign with the following:
.sink(receiveValue: { [self] image in self.imagePreview = image })
.store(in: &subscriptions)
everything works just fine. Any ideas?