Inserts a view above another view in the view hierarchy.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
Parameters
view
The view to insert. It’s removed from its superview if it’s not a sibling of
sibling
.Subview siblingSubview
The sibling view that will be behind the inserted view.
Discussion
This method establishes a strong reference to view
and sets its next responder to the receiver, which is its new superview.
Views can have only one superview. If view
already has a superview and that view is not the receiver, this method removes the previous superview before making the receiver its new superview.