Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Playlist Browser with Swift Refactoring Our Code Tapping On Our Playlists

Kris Larsen
Kris Larsen
8,015 Points

I need help, because when i press on one of the pictures in my app i get a fail!

i get this fail...

Could not cast value of type 'UIView' (0x18aecd0) to 'UIImageView' (0x18afb94)

can anyone tell me what i have to do.??

3 Answers

Pedro Laplaza
Pedro Laplaza
1,960 Points

check that the name of the element on the storyboard and on the viewcontroller are the same, otherwhise it will crash

Kris Larsen
Kris Larsen
8,015 Points

i found a solution but thanks for your time...

hans wagner
hans wagner
4,872 Points

Could be several possible reasons. Can you provide the code you are using as well as the version of Xcode.

hans wagner
hans wagner
4,872 Points

Glad you found an answer.