标签:
-(NSMutableDictionary *)deleteNull
{
if (self) {
for (NSString * key in self) {
if (self[key]==nil || [self[key] isEqual:[NSNull null]]) {
[self setObject:@"" forKey:key];
}
}
}
return self;
}
-(NSMutableDictionary *)deleteNull
{
if (self) {
NSDictionary * dict=[[NSDictionary alloc]initWithDictionary:self];
for (NSString * key in dict) {
if ([[self objectForKey:key] isKindOfClass:[NSNull class]]) {
[self setObject:@"" forKey:key];
}
}
}
return self;
}
标签:
原文地址:http://www.cnblogs.com/tongyuling/p/4834422.html