Ordinarily, being a good Cocoa citizen, I write my initializers returning type id
(i.e. pointer to generic object) for easier subclassing later (though 99% of time I do not need that).
Now I'm creating my own class cluster (lots of private classes capped with single public class). The question: Do I still need to define private classes' initializers as returning generic id
pointer:
- (id)initSubclassForFooClassCluster;
or a pointer to the private class itself like:
- (SubclassForFooClassCluster *)initSubclassForFooClassCluster;