I am using the following code ...
-(id) initWithVariableName:(NSString*)variableName withComparisonValue:(NSString*)comparisonValue {
// super init
This is not a problem at all in the modern Objective-C. In the modern Objective-C, properties are automatically synthesized and their corresponding instance variables get a _
prefix.
So, with auto-synthesis your properties would create instance variables _variableName
and _comparisonValue
. No shadowing occurs in this case.
More info in this blog post
If you absolutely need to manually synthesize your properties, rename the sinthesized ivar like this
@synthesize variableName = _variableName;
In general case, rename your method arguments.