Reputation: 9001
I have a scene called Login that has two main views: Center and BG.
BG contains an image asset, and I'm trying to get the view to the back of the screen (with Center on top).
It looks correct in XCode, however when I simulate it, it appears on top, blocking the rest of the page:
How can I move the BG view to the back?
Upvotes: 1
Views: 65
Reputation: 76
To my eye it seems that the problem is in the constraints or alpha levels. As Center is placed higher than BG in the view hierarchy, it should be visible if both of these are set correctly.
Upvotes: 1
Reputation: 4085
Assuming that Center and BG both are subviews, have you tried following func on UIView ?
func insertSubview(_ view: UIView,
aboveSubview siblingSubview: UIView)
Here the Apple documentation link - https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/instm/UIView/insertSubview:aboveSubview:
Upvotes: 0