0

My application looks like this in xcode:

enter image description here

I want to add a transparency effect, so I add a visualEffectView. I get this:

enter image description here

Cool, it's made the window translucent. But now I can't see any of my UI. Same is true in my xcode storyboard, I can't see any of my UI:

enter image description here

So how do I move the visual effect view behind all of my other elements? Do I do this by changing the z index programatically? If I can do it programatically, how can I get it to also move behind the rest of my UI in storyboard? Any code that adjusts the z index will do so at compile-time, meaning I still won't be able to see my UI in xcode.

EDIT - I have since found the arrange tab under editor in the menu, but the buttons for send to back are greyed out:

enter image description here

SuperHanz98
  • 2,090
  • 2
  • 16
  • 33
  • Okay, I've found something that works. For some reason, you can't send the visualEffectView to the back. You have to just bring everything else forward... I'll add this as an answer when stack lets me. – SuperHanz98 Jul 12 '19 at 08:24
  • Okay, even better answer - The position of the view in the hierarchy on the left correlates with it's z index. You can just move things up or down in that structure and it will move it backwards or forwards. Hope this helps any other xcode noobs like me. – SuperHanz98 Jul 12 '19 at 08:26

1 Answers1

0

You can use the list to the left of the storyboard to change the order (z-index) of the elements. Elements at the bottom of the list are positioned at the front and vice versa. You can simply drag elements up or down to reposition.

SuperHanz98
  • 2,090
  • 2
  • 16
  • 33