When writing c#, in Visual Studio, you can set regions to group code accordingly. Being new to Xcode I can't seem to find a similar feature.
Keep (hold) ⌘ (command) button in pressed condition and click on highlighted area. It will enable quick menu popover window with Fold option. Select Fold from menu list. It will fold your code and shows 3 dots, folding/covering entire block.
If you just want hide the blue lines (assuming that in future you may want to actually resume using Git) in the main menu under Xcode/Preferences (or Command + , ), choose the Source Control tab and uncheck Source Control: Enable Source Control . The other options will become greyed out.
Using Xcode editor, you can collapse or expand any block of code by clicking in the little left margin. Moreover, you can put a mark in any point in the code with:
#pragma mark
your title as long as you want
Your mark will then appear in the middle popup menu on top of the editor window.
Update: I have found that a duplicate of this question exists here. The answers may be of interest.
You can also use:
// MARK: -
or
// MARK: Initialization
which is more portable than #pragma mark.
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