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

Cannot convert return expression of type #50

Closed
perteraul opened this issue Jul 9, 2017 · 17 comments
Closed

Cannot convert return expression of type #50

perteraul opened this issue Jul 9, 2017 · 17 comments

Comments

@perteraul
Copy link

I'm having this error thrown out when trying to set up paper_onboarding from code, at the end of return onboardingItemAtIndex [index]

Cannot convert return expression of type '(Image, String, String, Image, UIColor, UIColor, UIColor, UIFont, UIFont)' (aka '(UIImage, String, String, UIImage, UIColor, UIColor, UIColor, UIFont, UIFont)') to return type 'OnboardingItemInfo' (aka '(imageName: String, title: String, description: String, iconName: String, color: UIColor, titleColor: UIColor, descriptionColor: UIColor, titleFont: UIFont, descriptionFont: UIFont)')

@DarkInnocence
Copy link

I am having the same error, moreover even if you explicitly typecast it, the app will crash as soon as you scroll to the next Onboarding view

@kornhera
Copy link

@perteraul Follow this format and it will work. I do however have the same issue as @DarkInnocence :/ return [(imageName: UIImage, title: "title", description: "description", iconName: UIImage , color: backgroundColorOne, titleColor: UIColor.white, descriptionColor: UIColor.white, titleFont: titleFont, descriptionFont: descirptionFont)][index]

@JustinBobo
Copy link

I'm getting this error after updating to 3.0.5.

@Conoize
Copy link

Conoize commented Jun 13, 2018

I am getting the same error of perteraul on swift 4.0.3 :/

@Conoize
Copy link

Conoize commented Jun 13, 2018

okay, error says : Cannot convert return expression of type '(UIImage, String, String, UIImage, UIColor, UIColor, UIColor, UIFont, UIFont)' to return type 'OnboardingItemInfo'
screen shot 2018-06-13 at 5 06 49 pm

@kornhera
Copy link

kornhera commented Jun 13, 2018 via email

@Conoize
Copy link

Conoize commented Jun 13, 2018

okay, thank you!, working on it!

@Conoize
Copy link

Conoize commented Jun 13, 2018

:/ Nope, still the same problem, I even checked the onboarding item info "go to definition" to see what this method looks for in the return function, and matched with what I had, everything matches but still the same issue

@otbox21
Copy link

otbox21 commented Jun 19, 2018

Did you happen to get it working, @Conoize ?

I'm having the same issue. When I was working through the demo, I remember getting this, but I somehow fixed it. Now, trying to put it in my app, I'm stuck again!

@Conoize
Copy link

Conoize commented Jun 19, 2018 via email

@otbox21
Copy link

otbox21 commented Jun 19, 2018

thanks, same!

@Conoize
Copy link

Conoize commented Jun 19, 2018 via email

@otbox21
Copy link

otbox21 commented Jun 19, 2018

I think I'm onto something here. I think we may need to go back to paper-onboarding 3.0.1.

I noticed in your code and my problematic code have this,

screen shot 2018-06-19 at 3 43 00 pm

...whereas the code I got working seemed to use a slightly different function
screen shot 2018-06-19 at 3 44 34 pm

Also, I'm a novice, so hopefully I'm not breaking anything! I'm going to try to make this work and will let you know.

@Conoize
Copy link

Conoize commented Jun 19, 2018 via email

@otbox21
Copy link

otbox21 commented Jun 19, 2018

yes! that did it! You'll need to clean out the current version of the cocoapod that you have and install an older one.

https://www.natashatherobot.com/install-earlier-version-of-cocoapod/

https://stackoverflow.com/questions/13751147/remove-or-uninstall-library-previously-added-cocoapods

@Conoize
Copy link

Conoize commented Jun 19, 2018 via email

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

7 participants