If I used categories to break up the implementation of my Objective-C class into multiple @implementation
blocks, would that make the resulting binary of my iOS app larger or affect performance at all?
Apparently, you can't Obtain details of categories on a class at runtime?. So, shouldn't the resulting binary be identical with or without categories, assuming all else equal?
Background
I have a custom subclass of UIViewController
that's getting rather complex.
iOS Developer Library : Programming with Objective-C : Categories
As well as just adding methods to existing classes, you can also use categories to split the implementation of a complex class across multiple source code files. You might, for example, put the drawing code for a custom user interface element in a separate file to the rest of the implementation if the geometrical calculations, colors, and gradients, etc, are particularly complicated.
The other nice thing about categories (as compared to #pragma mark
s, for example) is that Xcode lets you code fold an entire @implementation
block (but not the code between two #pragma mark
's). This is useful if you want to keep categories (optionally folded) in the same file as the main class.