NSArray *testArr = [NSArray arrayWithObjects:[NSNull class], nil]; UIView *d = testArr[0]; BOOL a = [d isKindOfClass:[NSNull class]]; //NO a = [d isEqual:[NSNull class]]; //YES a = [d isEqual:[NSNull null]]; //NO d = [NSNull null]; a = [d isKindOfClass:[NSNull class]]; //YES a = [d isEqual:[NSNull null]]; //YES a = [d isEqual:[NSNull class]]; //NO
偶然发现的,只是调试了下,还未总结分析,大家讨论下先
时间: 2024-10-26 17:46:22