Dynamically resize a XIB's root view to the size of its contents with Autolayout
How can I make the rootview of a XIB flexible so that it dynamically adjusts its size to match its contents?
Not possible Interface builder.
As the superview does not have any constraints there should be neither ambiguity nor conflicting constraints
Its not just a super view. Its also an objet in nib. We define simulated size for such views. This could be used to silence the errors. But again these are just simulated.
Is this rootView a view controllers view ? If yes i don't understand why are you trying to fix its withd to 280 and height to 168.
If this view is a custom view that you are going to add to another 'parent' view. Then you should change you simulated size to with 280 and height 168, and when adding this as subview you need to add two more constraints to position this rootview in the 'parent' view.