Objective-C convention to prevent "local declaration hides instance variable" warning
- by Nippysaurus
Is there a common convention for dealing with these scenarios? The following code is what I am using ..
-(id) initWithVariableName: (NSString*)variableName withComparisonValue:(NSString*)comparisonValue {
self.mustExist = NO;
self.reverseCondition = NO;
self.regularExpression = NO;
self.variableName = variableName;
self.comparisonValue = comparisonValue;
return self;
}
But I am getting "Local declaration of 'variableName' hides instance variable" and the same for "comparisonValue". The function signature seems logical to me, but surely there must be a more "acceptable" standard which will still make sense and be accurate but not generate annoying warnings?