YYModel
                                
                                
                                
                                    YYModel copied to clipboard
                            
                            
                            
                        是否支持泛型?
在使用过程中,我有一部分数据需要使用泛型进行聚合。
@interface HDModel<T> : NSObject
// 数据列表
@property ( nonatomic, strong ) NSArray<T> *allList;
/**
 近期最高数据
 */
@property ( nonatomic ) T highestDate;
/**
 近期最低数据
 */
@property ( nonatomic ) T lowestDate;
/**
 近期最新数据
 */
@property ( nonatomic ) T newestDate;
@end
大致是上述的类型,不知是否支持次类型。 因为在 mapper 处我无法反回 allList的数据类型。 T 可能是NSInteger 也可能是 某个类,或者 NSString等等类型
同问

Do you write and test with objective-C ?
不支持。OC 的所谓范型只是用于给编译器提供信息的,运行时是没有具体信息的。