Xib based view is always full-screen and displayed on top of all other views

475 views Asked by At

This is a generic question and I must be missing something simple.

I've create a xib file, put a few views in it, created a view class inherited from UI view, defined initWithCoder and initWithFrame, set File's Owner of the xib to this class. The view class loads the xib via loadNibNamed. I add this custom view to storyboard to a view which takes half of the screen. The view appears correct on the storyboard, I can set constraints for it, but when the app runs, the view is actually taking a full screen. It is not appearing inside the view I've added it to.

What am I doing wrong?

0

There are 0 answers