NSLog(@"echo>>>>>>%@",echo);
NSLog(@"echo>>>>>>%d",echo==nil);
NSLog(@"echo>>>>>>%d",[echo length]);
016-06-14 15:13:29.739 OA_App[4990:1558049] echo>>>>>><null>
2016-06-14 15:13:29.740 OA_App[4990:1558049] echo>>>>>>0 //这里不应该是1 true吗?
2016-06-14 15:13:29.740 OA_App[4990:1558049] -[NSNull length]: unrecognized selector sent to instance 0x34c15850
ringa_lee2017-04-18 09:15:47
It is not nil, it is an instance of NSNull. If you want to judge, it should be enough to judge whether it is NSNull class.
PHP中文网2017-04-18 09:15:47
Directly determine the length of the string, if it is equal to 0, it is empty