iOS????????Runtime??Model???
???????????? ???????[ 2015/7/30 13:48:46 ] ???????????????
???????????????????綹????????????????????????????????????????????????????????????????????Runtime????Model??????????????????????????????????key??Model?????????????????Runtime?????и??????????????????key?????Model????????????????????????????Runtime???????????????????
????iOS?????е?Runtime??ν??????????Runtime?????????????????????????????????????????Runtime????????÷????????????????塣
??????????????????????
??????????????????ò???iOS??????UI??????????????????????????????????????????????????main?????????Project??????????????????Create new project -> OS X -> Application -> Command Line Tool ->?·next????
????????????????????????
????1.???????for????????????????????key??value???????й??????????for????????????????????????????????????????£??ò????????????????????????JOSN????????????????????н?????????????????????????????????????????for??????????????????????á???????????????????£???????λ?÷???main???????У?
????1 NSMutableDictionary *data = [[NSMutableDictionary alloc] initWithCapacity:11];
????2
????3 //????????????????
????4 for(int i = 0; i <= 10; i ++){
????5 NSString *key = [NSString stringWithFormat:@"girl%d"?? i];
????6
????7 NSString *value = [NSString stringWithFormat:@"?????%d?????"?? i];
????8
????9 [data setObject:value forKey:key];
????10 }
????????????????????????????£???????????????????????????data?????????????????????JSON??????????????á?
????1 2015-07-20 22:33:15.742 BaseModelProject[65321:3224966] data = {
????2 girl0 = "?????0?????";
????3 girl1 = "?????1?????";
????4 girl10 = "?????10?????";
????5 girl2 = "?????2?????";
????6 girl3 = "?????3?????";
????7 girl4 = "?????4?????";
????8 girl5 = "?????5?????";
????9 girl6 = "?????6?????";
????10 girl7 = "?????7?????";
????11 girl8 = "?????8?????";
????12 girl9 = "?????9?????";
????13 }
????????????data????????????
????????????????Data????????????????????????????????????????key???μ???????????????????н????????????key??????????????????????
????1???????????????????????????????????????????????Щ???????????????????н??б?д???????????????????????????????????????Model???????????????????????С????????????????????????????????д???????????
????2. ????????????????BeautifulGirlModel????????BeautifulGirlModel?е???????????????????key?????????????????BaseModelObject?????????????BaseModelObject?????NSObject???ɡ?
1 //
2 // BeautifulGirlModel.h
3 // BaseModelProject
4 //
5 // Created by Mr.LuDashi on 15/7/20.
6 // Copyright (c) 2015?? ludashi. All rights reserved.
7 //
8
9 #import "BaseModelObject.h"
10
11 @interface BeautifulGirlModel : BaseModelObject
12
13 @property (nonatomic?? copy) NSString *girl0;
14 @property (nonatomic?? copy) NSString *girl1;
15 @property (nonatomic?? copy) NSString *girl2;
16 @property (nonatomic?? copy) NSString *girl3;
17 @property (nonatomic?? copy) NSString *girl4;
18 @property (nonatomic?? copy) NSString *girl5;
19 @property (nonatomic?? copy) NSString *girl6;
20 @property (nonatomic?? copy) NSString *girl7;
21 @property (nonatomic?? copy) NSString *girl8;
22 @property (nonatomic?? copy) NSString *girl9;
23 @property (nonatomic?? copy) NSString *girl10;
24
25 @end
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11