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! :)