[英]Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString isDescendantOfView:]:
I have received the crash in the app我在应用程序中收到了崩溃
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString isDescendantOfView:]:由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[__NSCFString isDescendantOfView:]:
Is anybody face similar to this issue.有没有人遇到类似这个问题。
It looks like you are sending the message isDescendantOfView:
to an instance of an NSString
class.看起来您正在将消息isDescendantOfView:
发送到NSString
类的实例。 NSString classes does not respond to such selectors. NSString 类不响应此类选择器。
isDescendantOfView:
is a method that belongs to UIView
classes . isDescendantOfView:
是属于UIView
类的方法。
The compiler normally prevents you from doing such things but it may be related to the fact that you handle id
types (that means 'An object of an unknown type').编译器通常会阻止您执行此类操作,但这可能与您处理id
类型(即“未知类型的对象”)这一事实有关。 In such cases, the compiler can't help you since the real type is only known at runtime.在这种情况下,编译器帮不了你,因为真正的类型只有在运行时才知道。 Make sure you call the method on the right object.确保在正确的对象上调用该方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.