Reputation: 455
In one of my Xcode projects, the SwiftUI Inspector won't show anymore.
When I create a new project, I have the inspector:
Any idea what is causing this? Can I maybe reset the settings of the project?
Upvotes: 6
Views: 3690
Reputation: 121
As of Xcode 15.0.1, this is what I found makes the SwiftUI Inspector work. You no longer use Command-Click to select the Canvas element and then open the SwiftUI Inspector. It's unfortunate that the "Introducing SwiftUI" tutorial hasn't updated the instructions yet.
Editor > Canvas
or option + command + return
View > Inspectors > Show Inspector
or option + command + 0
.Below is a screenshot of what the Canvas & Inspector half of the Xcode window could look like:
Note that, in the source editor, you can still select a snippet of SwiftUI code and right-click on it to reveal the "Show SwiftUI Inspector" option (as well as other helpful options) in the context menu.
Upvotes: 0
Reputation: 4471
Just ran into this issue where I couldn't see Show SwiftUI Inspector on Xcode 14.2. Turned out that there are couple things you need to do.
Editor -> Canvas
Selectable
Show Swift UI Inspector...
Upvotes: 0
Reputation: 257711
You must have Canvas opened to have SwiftUI context menu items in Editor (including SwfitUI Inspector)
Upvotes: 14
Reputation: 57
XCode 12 Update
Even after enabling the Canvas if the inspect option is not showing up because, Its been renamed to Show SwiftUI Inspector
Canvas https://i.sstatic.net/BmpVW.png
Editor https://i.sstatic.net/D74Ml.png
Upvotes: 2