[英]Messages without a matching method signature will be assume to return id
I'm getting a warning from the compiler : 我收到来自编译器的警告:
"warning: 'NSSortDescriptor' may not respond to '+sortDescriptorWithKey:ascending:' " “警告:'NSSortDescriptor'可能不响应'+ sortDescriptorWithKey:ascending:'”
...on this line of code: ...在这行代码上:
id sortDescriptor=[NSSortDescriptor sortDescriptorWithKey:@"value" ascending:YES];
the compiler is also saying the following: 编译器还说以下内容:
"Messages without a matching method signature will be assume to return id..." “将假定没有匹配方法签名的消息返回id ...”
+sortDescriptorWithKey:ascending:is a standard method of the platorm. + sortDescriptorWithKey:升序:是拼版的标准方法。 It's not my own class. 这不是我自己的课。
I think this message usually appears when you don't declare the method in the interface but again, this is not my method. 我认为当您不在接口中声明方法时,通常会出现此消息,但这又不是我的方法。
Any ideas... 有任何想法吗...
The sortDescriptorWithKey:ascending:
method was introduced in iOS 4.0. 在iOS 4.0中引入了sortDescriptorWithKey:ascending:
方法。 So it sounds like you are compiling with a Base SDK set to something lower than 4.0. 因此,听起来您正在使用设置为低于4.0的Base SDK进行编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.