Who's on top? Swift, nonSwiftUI

My SceneView hides part of my NSStackView's TextFields. I don't see anything in the inspector for the z dimension. How can I ensure the StackView is on top, i.e., wholly visible? I don't want to shove views around to "fit them in". They must overlap.
Indeed, I may wish to have all TextFields, etc. overlay the SceneView in the future, but that's a different subject.

I know this would be easy in SwiftUI, but...

Replies

Sort-of solved this, i.e., don't know why. I had a few unused/unpopulated StackViews that were off-ViewController?! I deleted them, rebuilt, and success!

  • Thanks for feed back, you can close the thread now.

Add a Comment

Do you create views in Interface Builder ?

If so, the view on top must be after in the list of views (as for Red View On Top, after Green View Below in list):

You get:

  • Ah, so the order of the Outlet statement controls. I tried the order in the StoryBoard without effect. Good to know.

  • No, normally it is the order in the storyboard that matters. If you move Red View higher in list, it will appear below Green. Even if there is no IBOutlet created, just the views in IB.

Add a Comment