1 | #import <objc/NSObject.h> |
2 | |
3 | @interface ObjcClass : NSObject { |
4 | int field; |
5 | } |
6 | |
7 | @property int property; |
8 | |
9 | +(ObjcClass*)createNew; |
10 | |
11 | -(id)init; |
12 | |
13 | -(int)method; |
14 | |
15 | @end |
16 | |
17 | @implementation ObjcClass |
18 | |
19 | +(ObjcClass*)createNew { |
20 | return [ObjcClass new]; |
21 | } |
22 | |
23 | -(id)init { |
24 | self = [super init]; |
25 | if (self) { |
26 | field = 1111; |
27 | _property = 2222; |
28 | } |
29 | return self; |
30 | } |
31 | |
32 | -(int)method { |
33 | return 3333; |
34 | } |
35 | |
36 | @end |
37 | |
38 | int main() |
39 | { |
40 | @autoreleasepool { |
41 | ObjcClass* objcClass = [ObjcClass new]; |
42 | |
43 | int field = 4444; |
44 | |
45 | return 0; // Break here |
46 | } |
47 | } |
48 | |