血的教训,下次开工程 一点要写好判断空字符串方法
+ (BOOL)isEmptyObject:(NSObject *)object
{
if ([object isEqual:[NSNull null]] || object == nil)
{
return YES;
}
else if ([object isKindOfClass:[NSString class]])
{
NSString *string = (NSString *)object;
if (0 == [string length])
{
return YES;
}
}
return NO;
}