TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

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!

1      

@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?

2      

@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.

1      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.