How to compare the hierarchical order of two subzones?

I want to find a way how I can compare the actual hierarchical order of two subzones.

Since I did not find a method that turns out to give me such a result, I want to ask you. I am sure there must be a way to do this.

Is it possible that the [view subviews] array is ordered with the same hierarchy?

Thanks Makrus

+3
source share
1 answer

Although I did not find a link to this in the docs, I am sure that the order of the elements in the array subviewscorresponds to their z-order. You can try to change the order of the subqueries in IB and log views on the console - you will see that the output supports this.

, : insertSubview:atIndex: exchangeSubviewAtIndex:withSubviewAtIndex:, z- subview, subviews...

+3

Source: https://habr.com/ru/post/1774116/


All Articles