region 注释+ structure 面板 应用场景:
一个类中,多个方法都是关于同一个功能的,这时候非常适合使用 region 注释划分,同时使用 structure 面板查看一个类通过 region 划分好的功能区域
surround by region
image
region 使用方法:
- 将某一功能的多个方法或变量放在一起
- 选中该区域的代码,按快捷键
cmd +option + z( surround with... ) - 选择
region...endregion Comments
image - 通过
cmd + 7或者直接点击左边structure面板,查看划分好的功能区域
image