- (void) sharedInit {
}
- (id) init
{
self = [super init];
if (self != nil) {
[self sharedInit];
}
return self;
}
-(id) initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
[self sharedInit];
}
return self;
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self sharedInit];
}
return self;
}
This is for a UIView subclass only, of course, but you could do the same thing for other classes as well.
No comments:
Post a Comment