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
Comments
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 |
@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] |
I'm getting this error after updating to 3.0.5. |
I am getting the same error of perteraul on swift 4.0.3 :/ |
I don’t remember what this is working on. Can you give me more info?
…On Wed, Jun 13, 2018 at 4:01 PM Conoize ***@***.***> wrote:
I am getting the same error of perteraul on swift 4.0.3 :/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Ramotion_paper-2Donboarding_issues_50-23issuecomment-2D397085187&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=aijoCk0FQqizD71ywDvYa4A4lb1nD6Y8VqJVWfraQw0&m=zn7zY2SRdTOZqtuUfNcmktRoyowNoJXKunLR3WP56V4&s=xLvFPJrTqx9zlFEOc_ytLPbGeSlgdWfv7ufpqEKAZl0&e=>,
or mute the thread
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_Ac-5FCOKqEmCWnS5GNOOFCf5LS4gLE8Ykgks5t8X11gaJpZM4OSEWn&d=DwMCaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=aijoCk0FQqizD71ywDvYa4A4lb1nD6Y8VqJVWfraQw0&m=zn7zY2SRdTOZqtuUfNcmktRoyowNoJXKunLR3WP56V4&s=xpmG6KnbfHab8NamnVM49Y7lBV2iDZmIyL6kvFYs4Nk&e=>
.
|
okay, thank you!, working on it! |
:/ 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 |
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! |
Nope still working on it, but I got a possible solution here , if it works I'll share it with you! :)
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: otbox21 <notifications@github.com>
Sent: Tuesday, June 19, 2018 2:50:17 PM
To: Ramotion/paper-onboarding
Cc: Conoize; Mention
Subject: Re: [Ramotion/paper-onboarding] Cannot convert return expression of type (#50)
Did you happen to get it working, @Conoize<https://github.com/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!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#50 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYTlKONt6HeY2FsWLjNH93EkEHR8_F9Cks5t-UfpgaJpZM4OSEWn>.
|
thanks, same! |
yeah I fixed already the error of the uiimage but now it doesn't show up 😞That's the only thing that remains, here is the code:
extension DemoScreen: PaperOnboardingDataSource {
func onboardingItemsCount() -> Int {
return 1
}
func onboardingItem(at index: Int) -> OnboardingItemInfo {
// let bgOne = #colorLiteral(red: 0.2196078449, green: 0.007843137719, blue: 0.8549019694, alpha: 1)
// let bgTwo = #colorLiteral(red: 0.5725490451, green: 0, blue: 0.2313725501, alpha: 1)
// let bgThree = #colorLiteral(red: 0.4062895179, green: 0.2437506914, blue: 0.06659346819, alpha: 1)
//
// let textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
// let titleFont = UIFont(name: "HelveticaNeue-Bold", size: 18)!
// let descFont = UIFont(name: "HelveticaNeue-Bold", size: 14)!
//
// return [(#imageLiteral(resourceName: "illustration"), "Beer", "Beer is awesome!", #imageLiteral(resourceName: "active"), bgOne, textColor, textColor, titleFont, descFont)][0]
let onBoardItem: OnboardingItemInfo = OnboardingItemInfo(informationImage: UIImage(named: "illustration")!, title: "PVG", description: "Beer is Awesome!", pageIcon: UIImage(named: "active")!, color: colorLiteral(red: 1, green: 0.8323456645, blue: 0.4732058644, alpha: 1), titleColor: colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), descriptionColor: colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), titleFont: UIFont(name: "AvenirNext-Medium", size: 18)!, descriptionFont: UIFont(name: "AvenirNext-Regular", size: 14)!)
let onBoardItem2: OnboardingItemInfo = OnboardingItemInfo(informationImage: UIImage(named: "card-1")!, title: "PVG", description: "Card is Awesosome!", pageIcon: UIImage(named: "active")!, color: colorLiteral(red: 0.4666666687, green: 0.7647058964, blue: 0.2666666806, alpha: 1), titleColor: colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), descriptionColor: colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), titleFont: UIFont(name: "AvenirNext-Medium", size: 18)!, descriptionFont: UIFont(name: "AvenirNext-Regular", size: 14)!)
let onBoardItem3: OnboardingItemInfo = OnboardingItemInfo(informationImage: UIImage(named: "post-1")!, title: "PVG", description: "Let's Personalize Your Experience!", pageIcon: UIImage(named: "active")!, color: colorLiteral(red: 0.4062895179, green: 0.2437506914, blue: 0.06659346819, alpha: 1), titleColor: colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), descriptionColor: colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0), titleFont: UIFont(name: "AvenirNext-Medium", size: 18)!, descriptionFont: UIFont(name: "AvenirNext-Regular", size: 14)!)
return [onBoardItem, onBoardItem2, onBoardItem3][index]
}
func onboardingDidTransitonToIndex(_ index: Int) {
if index == 2 {
doneBtn.isHidden = false
}
}
func onboardingWillTransitonToIndex(_ index: Int) {
if index != 2 {
if doneBtn.isHidden == false {
doneBtn.isHidden = true
}
}
}
func onboardingConfigurationItem(_ item: OnboardingContentViewItem, index: Int) {
}
}
…________________________________
From: otbox21 <notifications@github.com>
Sent: Tuesday, June 19, 2018 7:00 PM
To: Ramotion/paper-onboarding
Cc: Conoize; Mention
Subject: Re: [Ramotion/paper-onboarding] Cannot convert return expression of type (#50)
thanks, same!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#50 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYTlKEqxdlr-hj00G0KGI1Q8WTUUt7ydks5t-UpMgaJpZM4OSEWn>.
|
Yeah we could thell that we are in the same category 😅
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: otbox21 <notifications@github.com>
Sent: Tuesday, June 19, 2018 3:46:26 PM
To: Ramotion/paper-onboarding
Cc: Conoize; Mention
Subject: Re: [Ramotion/paper-onboarding] Cannot convert return expression of type (#50)
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]<https://user-images.githubusercontent.com/28899386/41620373-7b0c17fe-73d7-11e8-8cd8-6b0cc5d5192b.png>
...whereas the code I got working seemed to use a slightly different function
[screen shot 2018-06-19 at 3 44 34 pm]<https://user-images.githubusercontent.com/28899386/41620442-bd1547f6-73d7-11e8-86d0-baba7eccbb31.png>
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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#50 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYTlKM88hdYoJX4bjGEpnCkwT6bbQGWqks5t-VUSgaJpZM4OSEWn>.
|
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 |
Yeah! It worked over here too!!
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: otbox21 <notifications@github.com>
Sent: Tuesday, June 19, 2018 4:09:09 PM
To: Ramotion/paper-onboarding
Cc: Conoize; Mention
Subject: Re: [Ramotion/paper-onboarding] Cannot convert return expression of type (#50)
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#50 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYTlKJ4AufEQBM1npaB6hnE57F1y1cssks5t-VplgaJpZM4OSEWn>.
|
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)')
The text was updated successfully, but these errors were encountered: