BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>

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.


Save 50% in my Black Friday sale.

SAVE 50% To celebrate Black Friday, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

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.