您可以在Xcode中设置代码区域吗? [英] Can you set code regions in Xcode?

查看:75
本文介绍了您可以在Xcode中设置代码区域吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中编写c#时,可以设置地区以对代码进行相应的分组.作为Xcode的新手,我似乎找不到类似的功能.

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.

推荐答案

使用Xcode编辑器,您可以通过单击左侧的小边距来折叠或扩展任何代码块.此外,您可以使用以下代码在代码中的任何位置标记:

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 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.

这篇关于您可以在Xcode中设置代码区域吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆