We have some code in objective-c categories which we want to share between projects. There are (at least) two approaches we can take:
- Put them in one category per class, called something like
UIView+SGBExtensions
- Put then in a number of different categories by use, e.g.
UIView+SGBLayout
,UIView+SGBDrawing
, etc..
My instinct is to go with the latter, as it will be more descriptive and we can cherry-pick. However, most of our apps will include most of the shared code, so I'm a little concerned that having a lot of categories might impact performance or app size. Is there a drawback to having many objective-c categories?