What is the purpose of #pragma
marks in Xcode? Does their location in .m
files matter? Should some #pragma
come before all others?
- Do they have to be present?
- Can new marks be added? Why would they be? What causes it?
- Is there any harm in having a mark removed? Would one ever want to?
Best Answer
#pragma mark
directives show up in Xcode in the menus for direct access to methods. They have no impact on the program at all.For example, using it with Xcode 4 will make those items appear directly in the Jump Bar.
There is a special
pragma mark -
which creates a line.