首页 > 代码库 > iOS-BugList:NSNull equal

iOS-BugList:NSNull equal

    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
    


偶然发现的,只是调试了下,还未总结分析,大家讨论下先技术分享

iOS-BugList:NSNull equal