XCode 4.0.2 和警告不会消失!

发布于 2024-11-05 07:39:34 字数 491 浏览 9 评论 0原文

我今天从 xcode 4.0 升级到 4.0.2(不知道为什么,但我读到的所有内容几乎都说“我必须”......这是为什么?)。

无论如何,在这次升级之后,我注意到由于“静态”(类)方法调用而出现警告。我有一个类,它有两个同名的方法(一个方法有一个额外的参数,因此签名略有不同)。这以前不是问题,但现在我收到语义警告。该警告仅抱怨这些方法调用之一。

无奈之下,我用其他方法签名替换了所有警告行。警告仍然出现。

因此,在绝望中,我再次注释掉了所有引起警告的行。但警告仍然出现。我什至重新启动了XCode,甚至重新启动了机器,但没有任何进展。 每次我测试这个时,我都会进行清理和重建。

这是 XCode 4.0.2 的错误还是我完全错过了一些新的 XCode 4.0 概念???

* 已更新 *

看来这是我的用户错误。我有 2 个构建目标。所有警告均来自未选定的目标。一旦我选择了正确的目标并再次清理+构建,所有警告都消失了。 - 解决了。

I upgraded from xcode 4.0 to 4.0.2 today (not sure why, but everything i read pretty much says that "i have to"... why is this?).

Anyway, after this upgrade I noticed a warning due to "static" (class) method call. I have a class that has 2 methods with the same name (one method has an extra parameter, so the signatures are slightly different). This wasnt an issue before, but now im getting a semantic warning. The warning only complains about one of these method calls.

In desperation i replaced all warning lines with the other method signature. The warning still shows up.

So again, in desperation, I commented out all the lines causing warnings. But the warnings still show up. I even restarted XCode and even rebooted the machine, but no progress.
Each time i test this i am cleaning and rebuilding.

Is this an XCode 4.0.2 bug or am i totally missing some new XCode 4.0 concept here???

* Updated *

It appears this was a user error on my part. I have 2 build targets. All the warnings were coming from the non-selected Target. Once I selected the proper target and clean+built again, all warnings disappeared. - RESOLVED.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哭了丶谁疼 2024-11-12 07:39:34

您既没有定义方法 +BeginViewAnimation:animationDuration: 也没有调用,所以看起来没问题。显然 XCode 在其他地方看到了调用。或者也许只需要清理目标?这可以解决很多问题。

编辑

通过从问题中删除代码,人们无法再看到上下文,但下面的评论证明我的分析是正确的:XCode 已经看到了另一个目标的调用,正确地清理、选择和构建了目标解决了这个问题。

You are neither defining the Method +BeginViewAnimation:animationDuration: nor calling, so it looks ok. Obviously XCode sees the call at some other place. Or maybe all that is needed is to clean target? This cures a lot of issues.

EDIT

By removing the code from the question one cannot see the context anymore, yet the comment below proves that my analysis was right: XCode has seen the call at the other target, properly cleaning, selecting and building the targets has cured the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文