Skip to content

Instantly share code, notes, and snippets.

@tjw
Created April 8, 2011 17:18
Show Gist options
  • Save tjw/910308 to your computer and use it in GitHub Desktop.
Save tjw/910308 to your computer and use it in GitHub Desktop.
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