我可能在这里犯了一个愚蠢的错误,但我一直盯着我的代码看,无法弄清楚问题出在哪里。我在我的 ViewController .h 文件的 @interface 中定义了一个方法:
- (void) displaySubviewPopup:(PopupView *)currentPopup forTimerID:(int)timerID;
然后在我的 .m 文件中我实现了这样的方法:
- (void) displaySubviewPopup:(PopupView *)currentPopup forTimerID:(int)timerID {
...method implemented here...
}
然后在我的代码的其他地方我这样调用方法:
[self displaySubviewPopup:currentPopup fortimerID:timerID];
但由于某些奇怪的原因,我收到了 ol'“可能无法响应...”编译器警告“警告:‘SwimTimerViewController’可能无法响应‘-displaySubviewPopup:fortimerID:’”
我可能在这里遗漏了一些简单的东西,但就像我说的,我一直盯着我的代码,我的大脑开始昏昏欲睡,试图找出我在这里忽略的东西。看来我的方法实现是正确的......
有什么想法吗?如果需要,我可以发布更多代码,但这就是它的要点。
谢谢!
最佳答案
干净的眼睛真的很容易回答,虽然经常发生。
只需更改您的大小写:
[self displaySubviewPopup:currentPopup forTimerID:timerID];
希望对您有所帮助!
关于iphone - "' ViewController ' may not respond to ..."当我*已*在@interface 中声明该方法时发出警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6398674/