iphone - "May not respond to "警告

标签 iphone ios

'Treatment' 可能不会响应下面代码中的 '+findAllTreatments' 警告显示

_rootViewController.treatments = [Treatment findAllTreatments];

应该是什么原因。

最佳答案

在 Treatment.h(或声明 Treatment 类的 .h 文件)中声明 + (void)findAllTreatments;。不要忘记它是类方法,而不是实例方法。

关于iphone - "May not respond to "警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8518732/

相关文章:

iphone - NSMutableArray 始终为空

iphone - 如何等待位置管理器获取当前位置?

ios - initWithObjects :&value mean? 是什么意思

ios - 线程 1 EXC_BREAKPOINT(代码=1,子代码=0x101959bfc)Swift

iphone - 自动旋转从 UIWebView 播放的视频到横向模式

iphone - 检测相机何时可供使用

iphone - 在导航 Controller 中默认隐藏 UITableView 搜索栏

IOS Objective C - 从 url 接收 json 数据时出错

ios - TTTAttributedLabel 委托(delegate) didSelectLinkWithURL 在 iPhone 中没有被调用

ios - 如何减小 AIR 应用程序文件大小?