Howdy!
FYI This is mostly just a rephrasing of my question from the other week.
I have a superview which owns some subviews defined in a XIB. Until now, I have assumed that the @IBOutlet
defined in the owner/superview are set during the call to UINib.instantiate(withOwner:options:)
. Is assumption this incorrect?
In practice at least, this assumption seems to mostly hold true. But now I have run into a case where only some of the IBOutlet
s remain unset even after I instantiate and add to the view hierarchy.
What gives?
Thanks, smkuehnhold
Outlets are set during the instantiation process, however keep in mind that if you have weak
outlets, and there is nothing holding a strong reference to them by the end of the instantiation process (such as, for views, being inserted into a view hierarchy that has a strong reference at its root) then those references may be nil'd out by the end of the instantiation process.