Xcode: Best practices to show level of opening, closing braces?

I am new to SwiftUI and keep on making the same errors: out of scope errors because my opening and closing braces are out of sync.
Is there an easy way to show opening and closing braces in Xcode with color coding, highlighting or something like that so I can easily insert closing braces in the right place?

I think the best quick-check is to hold down command and hover over one of the braces.

Screen Shot 2021-05-31 at 11.36.26 PM

2 Likes

Thank you for the very useful tip! I learned something new!

You can also double-click an opening brace and it will select the entire closure, including the opening and closing braces.

2 Likes

Thank you! :grinning: :+1:

Very helpful!

This topic was automatically closed after 166 days. New replies are no longer allowed.