在iOS/Xcode開發過程中,出現如下異常信息:
no visible @interface for XXX declares the selector YYY
分析原因:
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.
有很多原因導致這一情況發生,但是一般而言,發生異常的代碼行,指沒有在interface接口文件中,找到任何你引用的selector(方法)。
可能的原因:
- 沒有在interface進行聲明定義
- 字母輸入錯誤
- 參數輸入有誤或少參數
舉例:

server是BulletinBoardClient類對象,其要實現BulletinBoard接口,但是其中的接口方法add和get是有參數的。

可行修改方法:

