I have created a different init method and would like that to be the designated initializer instead of the standard -init
. How can I prevent client code from instantiating the class using -init
?
e.g.
/* everyone must call this */
- (id)initWithInfo:(NSDictionary *)info {
self = [super init];
if (self) {
_info = info;
}
return self;
}
/* Don't want anyone to be able to create this using init */