I am using the following code ...
-(id) initWithVariableName:(NSString*)variableName withComparisonValue:(NSString*)comparisonValue {
// super init
If your method truly is an initialiser, don't forget to do your self = [super init];.
- (id) initWith...
{
self = [super init];
if (!self) return nil;
// do stuff
return self;
}
I have never personally encountered a situation where self has changed to nil or another value, but it's the Objective-C Initialiser Idiom™.