I've created a nib from which I load up my custom view with this code:
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:[[self class] description] owner:nil options:nil];
self = topLevelObjects[0];
But when I have autolayout enabled, I get this error:
Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view. Does the constraint reference something from outside the subtree of the view? That's illegal. constraint:<NSLayoutConstraint:0xb99a580 UIView:0xb997990.bottom == UIView:0xb995b20.bottom> view:<UIView: 0xb995b20; frame = (0 0; 320 320); autoresize = W+H; layer = <CALayer: 0xb995b80>>'
I want the view to be resizable. I don't want to use those undeletable autolayout size constraints. Setting their priority to 1 didn't work. In the superview I obviously don't have any constraint, I want this view to be universal.
How can I do this?