NSNumber判断数值对象部类

NSNumber判断数值对象类型if([value isKindOfClass:[NSNumber class]]){if (strcmp([value objCType], @en

NSNumber判断数值对象类型

if([value isKindOfClass:[NSNumber class]])          {              if (strcmp([value objCType], @encode(float)) == 0)               {                  [cell.detailTextLabel.text =  [NSString stringWithFormat:@"%.3f", [value floatValue]]];              }               else if (strcmp([value objCType], @encode(double)) == 0)               {                  [self.subTitleString appendString:[NSString stringWithFormat:@"%.3f", [value floatValue]]];              }              else if (strcmp([value objCType], @encode(int)) == 0)               {                  [self.subTitleString appendString:[NSString stringWithFormat:@"%d", [value intValue]]];              }              else                   [self.subTitleString appendString: [NSString stringWithFormat:@"%d", [value intValue]]];                        }  
?