开发者

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;

...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜