陈斌彬的技术博客

Stay foolish,stay hungry

判断保证数组非空的条件判断

3个条件缺一不可

 if (([self.arrayHospital[i]objectForKey:@"name"]!= nil && ![[self.arrayHospital[i]objectForKey:@"name"]isKindOfClass:[NSNull class]] && [[self.arrayHospital[i]objectForKey:@"name"] length] > 0))