本文介绍了'NSInvalidArgumentException',原因:' - [__ NSCFString _isDecompressing]:无法识别的选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode中发生此错误:

I have this error going on in Xcode:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString _isDecompressing]: unrecognized selector sent to instance 0x71863b0'

我有相当多的代码和类所以我不知道需要发布什么来开始研究这个问题。如果有人可以就如何开始解决这个问题给我一些指导,那将非常感激。附:如果还有其他需要发布的内容告诉我,我会编辑。

I have quite a bit of code and classes so I don't know what would need to be posted to start looking at this issue. If someone could give me some direction on how to start fixing this, it would be much appreciated. p.s. if there is anything else that needs to be posted tell me and I'll edit.

推荐答案

当你有无法识别的选择器发送到实例错误,您必须检查是否声明并实现了错误指出的方法,在您的情况下 _isDecompressing 。如果你的类上的一切都正常(声明并实现了该方法),那么看一下调用方法的类类型,在你的情况下 NSString 大部分时间这个班错了。

When you have unrecognized selector send to instance error, you have to check if you declared and implemented the method that is pointed out by the error, in your case _isDecompressing. If everything is ok on your class (the method is declared and implemented) then have a look at the class type that is calling the method, in your case NSString most of the time the class is wrong.

所以为了指出你的问题,你试图在<$ c $上调用方法 _isDecompressing c> NSString 哪个不存在。因此,请确保调用此方法的每个对象都是您想要的类型而不是 NSString

So in order to point out your problem, you are trying to call a method _isDecompressing on NSString which doesn't exist. So make sure every object that calls this method is of your desired type and not NSString

找到一个好方法导致崩溃的行是启用异常breackpoints。

A good way to find the line that is causing the crash is to enable exceptions breackpoints.

这篇关于'NSInvalidArgumentException',原因:' - [__ NSCFString _isDecompressing]:无法识别的选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 05:33