1

Referring statement:

Use an unowned reference only when you are sure that the reference always refers to an instance that has not been deallocated.

Weak and unowned can be used interchangeably for outlets?

@IBOutlet weak var OK: UIButton!

Vs

@IBOutlet unowned var OK: UIButton

BaSha
  • 2,356
  • 3
  • 21
  • 38

1 Answers1

0

Basically your question is: when to use weak and strong for IBOutlets?

The answer to this question is in one of the talks at WWDC 2015. The session is entitled, Implementing UI Designs in Interface Builder, and the answer comes at 31:30.

Jurasic
  • 1,845
  • 1
  • 23
  • 29