简体   繁体   中英

How to hide code documentation/comment in Xcode?

I'm writing swift in Xcode, reading others' code meanwhile btw. You know that swift has no header file, so the code documentation is just above the code, it's annoying me sometime. So my question is 'Is there some magic way to hide/show the documentation/comment? '

/// I'm talking about hiding this..
///
/// - Parameter name: name
/// - Returns: return
func someMethod(param name:String) -> String {
    return ""
}

Editor -> Code Folding -> Fold Comment Blocks

Shortcut:

  • Fold: Shift + Control + Command + Left
  • Unfold: Shift + Control + Command + right

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM