我经常使用#pragma mark - Description
在Xcode中组织我的方法。然而,我发现,有时候我需要类别和子类别为我的方法是这样的:是否有可能拥有“#pragma标记”层次结构?
公共方法
- 辅助方法
- amethod方法
- 其他方法类型
- anotherMethod
私有方法
- 法的某型
- aPrivateMethod
这可能吗?
我经常使用#pragma mark - Description
在Xcode中组织我的方法。然而,我发现,有时候我需要类别和子类别为我的方法是这样的:是否有可能拥有“#pragma标记”层次结构?
公共方法
- 辅助方法
- amethod方法
- 其他方法类型
- anotherMethod
私有方法
- 法的某型
- aPrivateMethod
这可能吗?
只需在主要部分前后使用-
将其围成一行,排除子部分的短划线,然后方法名称将一直显示。
#pragma mark - Public Methods -
#pragma mark Helper Methods
- (void)aMethod{}
#pragma mark Other Type of Methods
- (void)anotherMethod{}
#pragma mark - Private Methods -
#pragma mark Some Type of Method
- (void)aPrivateMethod{}
需要这应该是简化的任何代码。 – Sulthan