Skip to content

Instantly share code, notes, and snippets.

@jklausa
Last active August 29, 2015 14:03
Show Gist options
  • Save jklausa/a3205c6e00dc7fbc7a00 to your computer and use it in GitHub Desktop.
Save jklausa/a3205c6e00dc7fbc7a00 to your computer and use it in GitHub Desktop.
early-return obj-c init
- (instancetype)initWithFoo:(id)foo
{
self = [super initWithFoo:foo];
if (!self) {
return nil;
}
_foo = foo;
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment