NEW: Subscribe to Hacking with Swift+ and accelerate your learning! >>

Xcode Shortcut to Embed

Forums > SwiftUI

This is an Xcode+SwiftUI question: Within code, I'm looking for the shortcut keystrokes to pull up the menu to embed a SwiftUI element inside another like HStack or VStack. I thought it was Cmd+Ctl and then mouse-click on say a Text(...) item to pullup the option to embed...but can't find it. Any help?

   

Hold down the CMD key, if you hover over item they will be highlighted. While still holding down the CMD key click on an item to reveal the menu you are asking for.

The "Embed in HStack/Vstack" does not always appear for me, so there is a bug in Xcode...

   

Ths @loseth. That's what I thought, and it definitely used to work but not now.

FWIW: I'm on XCode ver: Version 11.6 (11E708)

Is anybody seeing that behavior work correctly and if so, what version of XCode are you on?

   

I have a similar problem in 12 beta 3, with a twist--in some projects I always get the embed options and in other projects I don't. And in some projects, I've had it available, and then it suddenly goes away and never comes back.

   

Subscribe to Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

Not logged in

Log in
 

Link copied to your pasteboard.