以下几种判断均无效
if (dict == nil || dict == NULL || [dict count] == 0) {
return;
}
正确判断姿势:
if ([dict isKindOfClass:[NSNull class]] || [dict isEqual:[NSNull null]]) {
return;
}
以下几种判断均无效
if (dict == nil || dict == NULL || [dict count] == 0) {
return;
}
正确判断姿势:
if ([dict isKindOfClass:[NSNull class]] || [dict isEqual:[NSNull null]]) {
return;
}