Skip to content

Instantly share code, notes, and snippets.

@tjw
Created Apr 8, 2011
Embed
What would you like to do?
static id _commonInit(MyView *self)
{
// common init stuff like so...
self.opaque = YES;
self->_scale = 1.0;
return self;
}
- initWithFrame:(CGRect)frame;
{
if (!(self = [super initWithFrame:frame]))
return nil;
return _commonInit(self);
}
- initWithCoder:(NSCoder *)coder;
{
if (!(self = [super initWithCoder:coder]))
return nil;
return _commonInit(self);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment