1

Assume there are 3 sub-views (A, B, C) in a view. After a few rounds of random bringSubviewToFront and sendSubviewToBack on A, B, or C , how can I tell whether one sub-view (e.g. A) is on top of another sub-view (e.g. C)?

Whether they overlap each other is not required information.

Thanks!

ohho
  • 49,193
  • 73
  • 246
  • 377
  • Duplicate: http://stackoverflow.com/questions/2343432/how-to-get-uiview-hierarchy-index-i-e-the-depth-in-between-the-other-subvie – pheelicks May 07 '10 at 09:05

1 Answers1

1

The order of subviews in a view is the same as the order in the subviews array. Which ever subview has a higher index in the subviews array is on top.

drawnonward
  • 52,944
  • 16
  • 104
  • 111