Keep your headers organized
Recently I began to refactor some source code in a big way. I realized that I had 2 classes which mainly dealt with the same thing, but were designed at different points in this apps development. Specifically it went from a single window app to a multi-window app and so for good design and just to eliminate any redundancy I decided to merge them into 1 class.
In doing so I started to organize over my headers and in the process I saw areas where multiple headers could be combined into 1 and got me thinking about the Objective-C class design of several classes within my app. In the end I started to do something like the following for organizing my header files…
#include ThisClass.h
//==CORE DATA=====================
#import ... // Core Data Convenience Functions
#import ... // Core Data ...
//==VIEW CONTROLLERS==============
#import ... // View Controller for ...
#import ... // View Controller for ...
#import ... // View Controller for ...
//==UTILITY=======================
#import ... // Debug Convenience methods...
#import ... // ...
It’s up to you how you organize these, but for me having the header files organized into general bins and having a brief description of each class/header made it much easier to get an overview of my headers, look at my header list quickly, find a specific header I am looking for, and think about my class design and areas for improvement.