Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode error: Initializer for conditional binding must have Optional type, not '(DYDataPoint) -> PointV' #4

Open
AntonioMC-Toni opened this issue Jul 28, 2023 · 1 comment

Comments

@AntonioMC-Toni
Copy link

I added the library using SPM, but I get this error immediately:
Initializer for conditional binding must have Optional type, not '(DYDataPoint) -> PointV'
The error is shown for lines 75 and 79 of DYLineView.

                if let _ = self.pointView {
                    self.points()
                }
                
                if let _ = self.labelView {
                    self.pointLabelViews()
                }

I tried changing to previous versions but I keep getting this error. I'm using Xcode 14.3.1, and the app is set for minimum deployment versions iOS 15.0. I hope this is of any help, and I honestly don't really understand the issue. Thanks!

@DominikButz
Copy link
Owner

Please update to 1.1.2. I have no idea why I didn't change those lines... I guess the instance variables must have been optionals before and I had changed them to non-optionals later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants