创建一个基于 BaseDataModel的模型 Model based on BaseDataModel
1. 基本模型 Normal model
| 1 | @interface User : BaseDataModel | 
| 1 | @interface User : BaseDataModel | 
| 1 | LOG_FORMAT(@"1: %@", COLOR_HEXSTRING(@"#FFFFFF")); | 
输出结果
| 1 | NSString *string = @"www.xfmwk.com"; | 
输出结果
| 1 | NSDate *date = [NSDate date]; | 
输出结果
字典中指定键值转换为字符串。(String value from the key value in a dictionary.)
| 1 | NSDictionary *dictionary = @{@"ID": @59, | 
将NSNumber转换为BOOL。(Bool value from a NSNumber object.)
| 1 | NSDictionary *dictionary = @{@"ID": @59, | 
JSON(字典或数组)转 JSON字符串。(JSON to string.)
| 1 | NSDictionary *dictionary = @{@"ID": @59, | 
JSON字符串转 JSON(字典或数组)。(String to JSON.)
| 1 | NSString *string = @"{\"ID\":59, \"name\":\"James\", \"age\":21, \"offline\":1}"; | 
下一期带来更多转换的示例。
相关链接调整。
对象判空。(Validate the object is nil or null.)
| 1 | NSObject *object; // Nil | 
字符串判空。(Validate the string is nil or null or empty.)
| 1 | NSString *string; // Nil | 
| 1 | @interface AttributedModel : BaseDataModel | 
一个简单易用的基于 FMDB的sqlite数据库工具。
创建 MDB 实例,如果数据库不存在会自动创建,数据库名 MDBName 在 AppConfig 配置。(Get instance of EFFMDBTool, create database named in AppConfig if not exist.)
参数:
无
返回值:
EFFMDBTool EFFMDBTool实例,不为空。
FMDatabase 实例,通过方法获取。(Get instance of FMDatabase with method style.)
参数:
无
返回值:
FMDatabase FMDatabase实例,不为空。
| 1 | /** | 
提供日期时间选择的对话框。
| 1 | /** | 
提供两级的数据模型。
| 1 | @interface LevelTwoModel : BaseDataModel |