关于“语义问题”的编译器警告——如何解决?
我在构建应用程序时收到此警告:
警告:语义问题:“datePicker”的本地声明隐藏了实例变量
这是什么意思以及如何修复它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能有一个带有名为
datePicker
参数的方法。此方法位于具有同名字段的类中。您需要更改这些变量之一的名称才能消除此警告。
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.
像这样重命名你的ivars:
rename your ivars like this: