1 | @interface RootObject |
---|---|
2 | @end |
3 | |
4 | @interface BaseClass : RootObject |
5 | @end |
6 | |
7 | @interface BaseClass() { |
8 | int _field1; |
9 | } |
10 | @property(atomic, assign, readonly) int field2; |
11 | |
12 | - (int)addFields; |
13 | @end |
14 | |
15 | @implementation BaseClass |
16 | - (int)addFields { |
17 | return self->_field1 + [self field2]; |
18 | } |
19 | @end |
20 | |
21 |