1 #import <Foundation/Foundation.h>
2 #import "InternalDefiner.h"
4 @interface Container : NSObject {
6 InternalDefiner *_definer;
12 @implementation Container
16 if (self = [super init])
18 _definer = [[InternalDefiner alloc] initWithFoo:4 andBar:5];
25 @interface InheritContainer : InternalDefiner
26 @property (nonatomic, strong) NSMutableArray *filteredDataSource;
30 @implementation InheritContainer
34 if (self = [super initWithFoo:2 andBar:3])
36 self.filteredDataSource = [NSMutableArray arrayWithObjects:@"hello", @"world", nil];
43 int main(int argc, const char * argv[])
46 Container *j = [[Container alloc] init];
47 InheritContainer *k = [[InheritContainer alloc] init];
49 printf("ivar value = %u\n", (unsigned)j->_definer->foo); // breakpoint1
50 printf("ivar value = %u\n", (unsigned)k->foo);