I'm working on an application that uses UIView
s as backgrounds to text. I've put the views behind the text in the storyboard
but for some reason some still seem to be in front of the text. Is there a way to send these view to the back programmatically? Here is a screenshot of what im talking about
You can use on of these two:
- (void)bringSubviewToFront:(UIView *)view;
- (void)sendSubviewToBack:(UIView *)view;
Objective-C Usage
view.sendSubviewToBack(subview)
and view.bringSubviewToFront(subview)
SWIFT 4.2 Usage
view.sendSubview(toBack: subview)
view.bringSubview(toFront: subview)
https://developer.apple.com/reference/uikit/uiview?language=objc