If you want to fold / unfold specific blocks of code, since Xcode 7, you have to enable that. Go to Xcode > Preferences > Text Editing > and check 'Code folding ribbon'. (No idea why they disabled this useful feature by default.)
There are other methods of collapsing code of course: to collapse all methods, hit SHIFT + OPTION + CMD + LEFT CURSOR. Likewise, to open all methods, use SHIFT + OPTION + CMD + RIGHT CURSOR. To open a single method, you can also click those little three dots in the yellow brackets.
How to enable the code folding bar next to the line numbers?
I googled "code folding Mac"; it's all about triggering code folding and unfolding, but nothing about enabling the bar.
I have tried using Editor -> Code Folding -> Fold/Unfold
to fold and unfold codes, but I don't have the vertical bar there next to the line numbers; so, I have the button to click to fold and unfold.
How can I enable that bar?
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With