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

SOLVED: Xcode: Inspecting view layout not visible

Forums > SwiftUI

Hey all,

this might be a stupid question ... watching Paul's videos, I've noticed whenever he selects a View in the source code, it will draw a rectangle around the view in the canvas / preview.

For me, this isn't the case. I might have turned it off at some point, but I can't find where to turn it back on again. Could anyone drop me a hint please?

Thanks in advance!

   

@Loradim is adrift in an ocean of options:

[...snip...] but I can't find where to turn Canvas selectable mode on.....

There are three buttons in the lower left leading corner of the canvas.

One is the traditional Play button which allows the canvas to be Live.
Live means sliders slide, toggles tog, and buttons butt.

The second looks like a wee mouse arrow. This is Play button's sister, Selectable. The third button, Variants, isn't part of this tutorial.

If you're keen to code like @twoStraws and have the graphical view selected when you click view code you'll need to first change options. Cool trick: if you select the object in the canvas, it will highlight the code in the editor. Sweet Irn Bru, that's nice.

Keep Coding!

Speaking of oceans, in the English phrase Pacific Ocean, all three Cs are pronouced differently. You just tried it, didn't you?

1      

@Obelix

I feel a bit dumb now, thank you again for helping me out.

Speaking of oceans, in the English phrase Pacific Ocean, all three Cs are pronouced differently. You just tried it, didn't you?

Yes, I did.

   

Save 50% in my WWDC23 sale.

SAVE 50% To celebrate WWDC23, 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!

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

You are not logged in

Log in or create account
 

Link copied to your pasteboard.