I have a parent view that has:
@State private var myImage:UIImage? = nil
I have a child view that wants to use it:
@Binding var myImage: UIImage?
Issue is it breaks my Coordinator call within that child view:
func makeCoordinator() -> Coordinator {
Coordinator(parent: self, myImage: $myImage)
// error "Cannot convert value of type 'Binding<UIImage?>' to expected argument type 'Binding<UIImage>'"
}
When all the optionals are removed, there is no error with the makeCoordinator function in my child view. What is the proper way to handle this?