Iphone 没有匹配方法签名的消息将假定返回id

Iphone 没有匹配方法签名的消息将假定返回id,iphone,ipad,Iphone,Ipad,我收到编译器的警告: “警告:'NSSortDescriptor'可能不响应'+SortDescriptor WithKey:ascending:'” …在这一行代码中: id sortDescriptor=[NSSortDescriptor sortDescriptorWithKey:@"value" ascending:YES]; 编译器还说了以下几点: “没有匹配方法签名的邮件将假定返回id…” +sortDescriptorWithKey:升序:是柏拉图的标准方法。这不是我自己的课 我

我收到编译器的警告:

“警告:'NSSortDescriptor'可能不响应'+SortDescriptor WithKey:ascending:'”

…在这一行代码中:

id sortDescriptor=[NSSortDescriptor sortDescriptorWithKey:@"value" ascending:YES];
编译器还说了以下几点:

“没有匹配方法签名的邮件将假定返回id…”

+sortDescriptorWithKey:升序:是柏拉图的标准方法。这不是我自己的课

我认为当您没有在接口中声明方法时,通常会出现此消息,但这不是我的方法


任何想法…

iOS 4.0中引入了
sortDescriptorWithKey:ascending:
方法。因此,听起来您是在使用低于4.0的基本SDK进行编译。

感谢您的快速响应。已安装IOS 4.1,但这是针对iPad的…IOS 3.2。您知道如何使用整数值作为排序键对多维数组进行排序吗?我试图完成这一点…我发现了…只是使用了实例方法-initWithKey:ascending,它工作得很好。