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

Could not cast value of type 'AlertOnboarding.AlertChildPageViewController' #7

Closed
fabioiegri opened this issue May 9, 2016 · 5 comments

Comments

@fabioiegri
Copy link

Hi Philippe and thank You for Your job.

I'm trying to use AlertOnboarding on my project but I receive the error:

Could not cast value of type 'AlertOnboarding.AlertChildPageViewController' (0x10d8b53f8) to 'Surf_Shop.AlertChildPageViewController' (0x10d2a6da8).

on:

pageContentViewController = UINib(nibName: "AlertChildPageViewController", bundle: nil).instantiateWithOwner(nil, options: nil)[0] as! AlertChildPageViewController

while the master project works fine.

Could You help me please to solve it?
Thank You very much
Kind regards
Fabio

@PhilippeBoisney
Copy link
Owner

Hi Fabio,

Did you install the lib manually or via Cocoapod ?

@fabioiegri
Copy link
Author

Hi Philippe, thank You for fast reply :)
I've installed the lib from cocoapods.

Thank You again
Fabio

@PhilippeBoisney
Copy link
Owner

Very strange... Did you modify the file on Cocoapod folder (Pods). It should be:
pageContentViewController = UINib(nibName: "AlertChildPageViewController", bundle: bundle).instantiateWithOwner(nil, options: nil)[0] as! AlertChildPageViewController

Try to update your cocoapod file, maybe you have an old release of AlertOnboarding :)
pod update

@fabioiegri
Copy link
Author

Philippe, solved.

Here my errors (for other users)

  1. I've installed the lib via cocoapods but I've also copied the pod files manually into my project instead of importing AlertOnboarding (import AlertOnboarding).
  2. I was using another variable called "alertView" (and I think this was the real problem) so AlertOnboarding wasn't casted (Could not cast value of type 'AlertOnboarding.AlertChildPageViewController')

Thank You very much for Your work with AlertOnboarding. You have rendered a difficult thing simple.
Thank You again
Best Regards
Fabio

@PhilippeBoisney
Copy link
Owner

Glad to hear that =D Indeed, you have to install AlertOnboard either manually or via Cocoapod.
If you do both, it raises an error.
See you soon !

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