doesNotRecognizeSelector:. :
- (id)copy
{
[self doesNotRecognizeSelector:_cmd];
}
However, there is a good chance that this is the wrong thing. The interface for the class is a contract; he indicates that an instance that is a view of this class (which includes instances of the subclass) will accept this message. When MyString is passed as NSString and does not accept the message length, it violates the contract and most likely will cause the program to crash, since no one will consider handling the NSInvalidArgumentException from the call lengthto NSString.
outis source
share