简体   繁体   English

如何在Xcode中隐藏代码文档/注释?

[英]How to hide code documentation/comment in Xcode?

I'm writing swift in Xcode, reading others' code meanwhile btw. 我正在迅速写Xcode,同时阅读别人的代码。 You know that swift has no header file, so the code documentation is just above the code, it's annoying me sometime. 你知道swift没有头文件,所以代码文档就在代码之上,有时让我讨厌。 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 折叠:Shift + Control + Command + Left
  • Unfold: Shift + Control + Command + right 展开:Shift + Control + Command + right

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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