Yes, sortSubviewsUsingFunction:context:
can do what you're looking to do, however it might be overkill if all you'd like is for one particular view to sit on top of the (unordered) others. In that case, you should look into the bringSubviewToFront:
method of UIView
. That way, you could do something like this in your IBAction for bringing up the handle:
[self.view bringSubviewToFront: handle];
Assuming that handle is an object that is/inherits from UIView. If this isn't what you're looking for, then by all means, go with sortSubviewsUsingFunction:context:
, in which case you'll need to alter the individual tag properties for each subview, and sort accordingly.