如何使部分源代码“折叠"?(隐藏)在 Xcode 中? [英] How can I make parts of the source code "folded" (hidden) in Xcode?
本文介绍了如何使部分源代码“折叠"?(隐藏)在 Xcode 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Visual Basic.Net 中我可以使用
In the Visual Basic.Net I can use
#Region "identifier_string" #End Region
在编辑器中折叠"(隐藏)部分源代码.
to "fold" (hide) parts of the source code in the editor.
我怎样才能在 Swift 中做到这一点?
How can I do that in Swift ?
推荐答案
@Eric D. 的回答是完美的.
@Eric D.'s answer is perfect.
如果你想标记一些区域,那么你可以像这样使用它:
If you want to mark down some regions then you can use it like as :
//标记:
前面会有一个水平分隔符
Will be preceded by a horizontal divider
//MARK:你的文字在这里
在下拉列表中以粗体显示您的文本在此处"
Puts 'your text goes here' in bold in the drop down list
//MARK: - 您的文字在这里
在下拉列表中以粗体显示您的文本在此处",前面是水平分隔线
Puts 'your text goes here' in bold in the drop down list, preceded by a horizontal divider
这篇关于如何使部分源代码“折叠"?(隐藏)在 Xcode 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文