SSModel
是一个非常简单的 BaseModel,我们只需创建一个继承自 ZRBaseModel 的 Model,该 Model 将具有这样的能力,常规数据分析就足够了。
/*
*Model 到字典 类似逆向的 setValuesForKeysWithDictionary
*/
- (NSDictionary *)properties_aps;
/*
*通过运行时获取当前对象的所有属性的名称,以数组的形式返回
*/
- (NSArray *) allPropertyNames;
+(NSMutableArray *)getDataWithArr:(NSArray *)arr;
/*
*缓存数据进文件夹
*/
-(void)ArchiverFileWithFileName:(NSString *)fileName;
+(instancetype)UnarchiverFileWithFileName:(NSString *)fileName;
使用 CocoaPods 将 SSModel 集成到您的 Xcode 项目中,在 Podfile 中指定它。
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
pod 'SSModel'
end
然后,运行以下命令:
pod install