The main difference is that with an extension, the compiler will expect you to implement the methods within your main
@implementation
, whereas with a category you have a separate @implementation
block. So you should pretty much only use an extension at the top of your main .m
file (the only place you should care about ivars, incidentally) -- it's meant to be just that, an extension.
No comments:
Post a Comment