没有可见的@interface [英] No visible @interface for

查看:115
本文介绍了没有可见的@interface的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经多次遇到这个错误,并且不清楚导致错误的原因。在堆栈溢出和谷歌上寻找超过一个小时后,我仍然没有答案。有人可以帮忙吗?

I have gotten this error on several occasions and am unclear as to what causes the error in general. After looking for over an hour on stack overflow and google I still don't have an answer. Could someone help?

我看过几个具体的答案,但没有说出错误发生的原因,只有做x或做y。

I've seen several specific answers but nothing that says why the error happens, only "do x", or "do y".

我还没有包含代码,因为我想知道这个错误一般发生的原因,所以每当我收到此错误时我都可以修复我的代码。

I haven't included code yet because I want to know the reason that this error happens in general so I can fix my code in the future whenever I get this error.

推荐答案

有很多原因可能会发生,但一般来说它会在它标记的代码行中说,它没有看到任何证据表明选择器你引用的是它认为对象所具有的类型的接口。

There are lots of reasons it could happen, but generally it's saying that at the line of code it flags, it doesn't see any evidence that the selector you are referencing is in the interface of the type it thinks the object has.

在这个例子中,

没有可见的界面错误

他们声明operandStack的类型错误。

They declared operandStack with the wrong type.

在这一个

http://www.raywenderlich.com/forums/viewtopic.php?f=2&t=3312

他们在选择器名称中有一个拼写错误

They had a typo in the selector name

这篇关于没有可见的@interface的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆