In objective-C # What does Pragma mark mean?
The following code commands are often seen in the code in xcode ide:
The following code commands are often seen in the code in xcode ide:
# Pragma mark-
# Pragma mark Initialization
# What is Pragma?
Technically, code starting with # pragma is a compiler instruction, which is a program or compiler-specific instruction. They are not necessarily applicable to other compilers or other environments. If the compiler cannot recognize this instruction, it will ignore it.
Function
They tell the xcode compiler to separate the code from the function pop-up menu at the top of the editor pane, as shown in:
Some classes (especially some controller classes) may be long, and the method and function pop-up menu can facilitate code navigation. In this case, the # pragma command is added to organize the code logically.
Note:
1 # There cannot be spaces behind the "-" Of The Pragma mark.
2. If your logo does not appear in the pop-up menu, for example, there is no separator line, go to the xcode menu "preferences .. "in the" Code sense "option, deselect" Sort list alphabetically.
From: http://www.weste.net/2011/2-24/pragma-mark.html