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 Simple iPhone App with Swift Creating a Data Model Refactoring Into a Model

kian christensen
kian christensen
2,186 Points

i made the folder with the array of facts but when i enter view controller it doesnt tranfer factsArray and FactBook

I made the folder and did everything like i was sapossed to but it doesnt tranfer over to view controller at all when i type the names of the array and struct in view controller it doesnt even auto fill im pretty sure its because this video was made on a older version but help

I think you should post your code for us to help you

can share this project so i could run it and see why nothing is passing ?

kian christensen
kian christensen
2,186 Points

frack this shit im restarting

kian christensen
kian christensen
2,186 Points

meek how do i share the project

I have a question tho why you have the array into a struct ? and also don't be mad because sometime you will get it right and other time not but you just need to do some research lol

Allan Clark
Allan Clark
10,810 Points

he is following the design of the course. there is more to that struct in later modules. talk about doing research huh? lol

lol @alan you got jokes...

1 Answer

Allan Clark
Allan Clark
10,810 Points
@IBAction func showFunFact() {
     funFactLabel.text = factsArray[1]
}

You initiated the FactBook constant to with the name factBook. This line should have factBook[1], not factsArray[1].

Side note: Copy and paste code next time, makes it easier on us.

Hope this helps