I use #pragma mark - Description
frequently to organize my methods in Xcode. However, I find that sometimes I need to categories and subcategories for my methods, like this:
Public Methods
- Helper Methods
- aMethod
- Other Type of Methods
- anotherMethod
Private Methods
- Some Type of Method
- aPrivateMethod
Is this possible?
Simply only use the -
before and after your main section to surround it in lines, exclude the dash for the subsections, and then the method names will show as always.
#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{}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With