You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
680 B
30 lines
680 B
//
|
|
// MJPropertyKey.h
|
|
// MJExtensionExample
|
|
//
|
|
// Created by MJ Lee on 15/8/11.
|
|
// Copyright (c) 2015年 小码哥. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
typedef enum {
|
|
MJPropertyKeyTypeDictionary = 0, // 字典的key
|
|
MJPropertyKeyTypeArray // 数组的key
|
|
} MJPropertyKeyType;
|
|
|
|
/**
|
|
* 属性的key
|
|
*/
|
|
@interface MJPropertyKey : NSObject
|
|
/** key的名字 */
|
|
@property (copy, nonatomic) NSString *name;
|
|
/** key的种类,可能是@"10",可能是@"age" */
|
|
@property (assign, nonatomic) MJPropertyKeyType type;
|
|
|
|
/**
|
|
* 根据当前的key,也就是name,从object(字典或者数组)中取值
|
|
*/
|
|
- (id)valueInObject:(id)object;
|
|
|
|
@end
|
|
|