Created
May 25, 2012 03:32
-
-
Save eliaskg/2785598 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)initWithName { | |
if (self = [super initWithDifferentName]) { | |
// Bla.. | |
} | |
} |
I think I got it, it's even easier than I thought:
class SubClass < NSObject
def initWithName
init
# do something
self
end
end
Thank you :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this should work, if you didn’t redefined initWithDifferentName() in our subclass, super will be called,
if you override the initWithDifferentName() method you will need to call super