uiview displayed in the order in which they are stacked. you can change this to say that you need to insert a new uiview , which in your case is uibutton.
one way to do this is by creating an IBOUtlet for uibutton and adding this button instance as a subset / new view over an existing uiview .
CODE:
[self.view insertSubview:<new Uiview> aboveSubview:<existing uiview>];
Also, if you cannot determine the uiview order, you can check that in xcode
- When you start a project in debug mode, there is a button in the debug window (highlighted in the image below) Debug viewing hierarchy , you need to click it. (highlighted below).

- After that, you can see the entire rendering of the
views on the screen in the current instance, using this function, which you can understand is that your new uiview is in the uiview stack order (shown below).

Happy coding :)
dreamweiver
source share