When adding a subview it will be placed above all other subviews. However, after adding a subview you can changes it’s layer position. There are 3 main ways of playing with the layering of views.
The following technique will place a view above all other subviews:
The following will place a view below all other subviews:
The following will swap the z-positions of two views:
You can also explicitly set the z-position of a view: