Other than suppressing compiler warnings with #pragma, it is very useful to organize codes by using #pragma
marks as section headers and dividers.
For example, like this:
@implementation SomeClass
#pragma mark Accessors
//Code...
#pragma mark Overridden SomeParentClass
//Code...
The #pragma
marks are displayed in bold in Xcode when you browse the list of methods, letting you group code for specific purposes together. You can also use the following to draw a line in the list of methods.
#pragma mark -
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.