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!

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 View Controllers and Views Creating IBOutlets

Graeme Robertson
Graeme Robertson
3,002 Points

View controller line of code

hi, after following the steps from the last video, i seem to have a different line of code:

@IBOutlet var funFactLabel: UILabel!

in my code there seems to be no key work weak. will this be a problem or have i not followed the steps correctly?

1 Answer

Dhanish Gajjar
Dhanish Gajjar
20,185 Points

You might have missed to changed the reference from weak to strong. When you press control and drag the reference to the viewController, make sure, the storage type is weak and not strong. Strong storage does not make the reference weak, that is why you don't have the weak keyword.

Hope it helps! :)