iOS engineer who likes clean, simple designs and sans-serif.

Loading

Using Pragma Marks To Make Your Code More Readable

I love pragma marks. They just make reading your code so much easier, especially for other developers looking at your code for the first time. To use them, organize your methods in logical groupings and then add this line (including the dash) to your code.

Example:

  #pragma mark - UIViewController

When you do this, XCode will organize your code with separators when you click on the navigator. When your code base gets huge, this will be exponentially more helpful. Give it a try!

pragmaMark

For more, I liked this NSHipster article.

Leave a Comment