I am using a custom UIView
which contains the following elements by default (after init is called these are set) :
UIImageView
UIView
UIView
these are declared as open var
in class code.
In my code I am adding another UIView
like this:
myView?.addSubview(div)
myView?.bringSubview(toFront: div)
Now calling bringSubviewToFront
works only on the div element which was added by code and not on the default views.
myView?.bringSubview(toFront: myView?.likedView)
How can I bring the UIViews to front?