I have a view which subclasses UIView
:
class MyView: UIView {
@IBOutlet weak var myLabel: UILabel!
@IBOutlet weak var myButton: UIButton!
//..
}
The IBOutlet
s are specified in a nib
. I also instantiate MyView
from the nib
.
If MyView
has a view controller, I would use viewDidLoad
to determine when myLabel
and myButton
are instantiated. However, this is not the case here, as MyView
is instantiated directly from a nib
.
What should I do to determine when the two IBOutlet
s are instantiated in this case?