1 min readMar 10, 2019
No IBOutlets initialized. I had to assign them manually at the end of xibSetup taking them from the view which got loaded from the Nib, like so:
func xibSetup() {
guard let view = loadViewFromNib() else { return }
view.frame = bounds
view.autoresizingMask =
[.flexibleWidth, .flexibleHeight]
addSubview(view)
contentView = view
topLabel = contentView?.topLabel
imageView = contentView?.imageView
}