I'm trying to load a nib into a collection view cell programatically but I'm getting an NSException error. Can't figure out why.
if let nib = Bundle.main.loadNibNamed("CardCellBottom", owner: self, options: nil)?.first as? CardCellNib {
nib.translatesAutoresizingMaskIntoConstraints = false
nib.frame = bounds
bottomView.addSubview(nib)
}
If I remove this code from the view everything works. So the issue lies here. "CardCellBottom" is correctly named and CardCellNib inherits from UIView.
Thanks