What most likely is forgotten in this case is to add the following code in the context of loading the nib and adding it to the custom view's/widget's subviews:
UIView* rootView = [[[NSBundle mainBundle]
loadNibNamed:className owner:self options:nil] firstObject];
rootView.translatesAutoresizingMaskIntoConstraints = NO;
[self addConstraint:
[NSLayoutConstraint
constraintWithItem:rootView attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop
multiplier:1.0f constant:0.0f]];
// And so on for all attributes (Bottom, Left, Right) that you want to
// constrain the loaded nib with.
(Where self is the custom uiview/widget instance in question.)