The #pragma is a special preprocessor directive that allows the C preprocessor to create largely portable extensions. Basically, when another preprocessor sees a pragma directive that he does not understand, he should ignore it.
In this case, #pragma mark intended to help with the documentation. When you add these lines to the source file, Xcode breaks your source code in its drop-down menu, which you can use to go to certain areas of your code (for example, defining functions or defining constants). If you add #pragma mark - , Xcode will add a horizontal separator to the drop-down menu.
Jason coco
source share