Re: Subviews Order in XCode/IB
toggle quoted messageShow quoted text
To repeat the old, old counter-question…
What are you trying to accomplish? Why do you care?
Musings follow on why it might be futile to rely completely on array index.
The documentation for `-[NSView subviews]` says the order is usually Z order, or order of insertion, whether in the XIB or programmatically. Maybe insertion is the tiebreaker for Z.
For my part, I'd never keep creation order (if that's what order-in-XIB means) straight in my head. Rather than rely on index as a stable identified of a subview, it'd be easier to leave the ordering of `subviews` be and rely on the `tag` property of each subview for indexing.
On Jan 20, 2020, at 7:32 AM, Dave <dave@...> wrote: