UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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.


Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.