Big but not scary: #pragma marks in Xcode (iOS)

I've been putting off finding out what #pragma marks are ever since noticing them. I presumed they were another complex area of the Xcode program. However, having now watched Paul Hegarty's lecture on UIVTableViews I know that they are a simple way of adding headings to your code.

You can change the text that follows the dash to whatever you like and also add your own using the same syntax:

    #pragma mark - This is a heading

The results of which divide up your list of methods with headings as shown in this screenshot:



Comments