You would check the presentation order in the supervision (of the controls, in your case self.view) subviews .
The view at index 0 in the subview is the view at the very end, and then the view at index 1 will be on top, and the view at index 2 will be on top of the view at index, etc.
(basically a view is on top of views with a lower index compared to its own index)
NSInteger indexOfControl1 = [[self.view subviews] indexOfObject:control1]; NSInteger indexOfControl2 = [[self.view subviews] indexOfObject:control2]; if (indexOfControl1 > indexOfControl2) {
source share