Swift中的#pragma mark?

眉间皱痕 提交于 2020-08-08 12:16:04

问题:

In Objective C, I can use #pragma mark to mark sections of my code in the symbol navigator. 在Objective C中,我可以使用#pragma mark在符号导航器中标记我的代码部分。 Since this is a C preprocessor command, it's not available in Swift. 由于这是一个C预处理器命令,因此在Swift中不可用。 Is there a stand-in for this in Swift, or do I have to use ugly comments? 在Swift中是否有替代,或者我是否必须使用丑陋的评论?


解决方案:

参考一: https://stackoom.com/question/1cm04/Swift中的-pragma-mark
参考二: https://oldbug.net/q/1cm04/pragma-mark-in-Swift
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!