基本上我有一个视图,我创建了一个单独视图的子视图,我将其用作容器,但第一个视图不会出现在其父视图之前。在情节提要上,子视图显示在其父视图的前面,但在模拟器上它在后面。
编辑-抱歉缺少细节让我澄清一下
This is my XIB I named it SectionCard very basic only containing a single view with a black background
This is my storyboard all I have done is change the background to red I have added my SectionCard (which I set to clear color) and a basic view as the child of my section card I have set the color of which to pink
So I thought when I run it I would get my red background a black rectangle with a smaller pink rectangle inside it however for some reason I get this-
Initially I thought that the pink rectangle view was simply invisible however after commenting the view.frame = self.bounds line and shrinking the SectionCard in the XIB file I noticed that the SectionCard was actually covering up the pink view
Hopefully this helped explain my issue in more depth any help is appreciated!!!