If I have several different groups of methods that I would like to use in multiple classes
, which are all subclasses of UIViewController
, would it be better style to include all of these methods into a single category
, like UIViewController+allGeneralMethods.h
or have multiple categories
like UIViewController+Animations.h
, UIViewController+GestureRecognizers
, UIViewController+DateFormatters
, etc.
I assume that your goal is to keep your code easy to investigate, use and modify.
Put all groups in one category if:
Put your code in several categories in other cases.