我正在搜索带有电子邮件的 NSString 以查找 @ 字符。这是代码:
NSRange range = [string rangeOfString:@"@"];
if (range.location != NSNotFound) // do stuff
这是我得到的错误......
-[__NSCFNumber rangeOfString:]: unrecognized selector sent to instance 0x1e51c550
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber rangeOfString:]: unrecognized selector sent to instance 0x1e51c550'