Re: Subviews Order in XCode/IB

Alex Zavatone
 

Have you used [parentView recursiveDescription] to show what the view hierarchy is? It’s Objective-C, but you can expose it to Swift if you wish.

On Jan 20, 2020, at 7:32 AM, Dave <dave@...> wrote:

Hi All,

I have a number of subviews in a view, in IB it looks like this:

NSView1
NSView2
NSButton1
NSButton2

However when I look in the Views subviews property in shows:

NSView1
NSButton1
NSButton2
NSView2

I thought that the order in IB was the order would same as the subviews array and it seems to be most of the time.

Is this not the case?

All the Best
Dave



Join xcode@apple-dev.groups.io to automatically receive all group messages.