Compiler warning about "Semantic Issue" -- how to fix?
I receive this warning when building my app:
warning: Semantic Issue: Local declaration of 'datePicker开发者_如何学运维' hides instance variable
What does this mean and how do I fix it?
You probably have a method with parameter named datePicker
. This method is located in a class which has a field with the same name.
You need to change a name of one of these variables to get rid of this warning.
rename your ivars like this:
@interface SomeClass{
NSString * _datePicker;
}
@property (nonatomic,retain) NSString * datePicker;
@end
@implementation SomeClass
@synthesize datePicker =_datePicker;
...
精彩评论