This is a simplified structure of my app
A.h
#import "B.h"
@interface A : NSObject {
B *b1;
}
B.h
@interface B : NSObject {
}
That works fine, but now I need to create an array of A-s in B so this is what I have done
A.h
#import "B.h"
@interface A : NSObject {
B *b1;
}
B.h
#import "A.h"
@interface B : NSObject {
NSMutableArray *aArray;
}
-(void) addA: (A*) aTemp{
[aArray addObject:aTemp];
}
-(NSMutableArray*) getArray{
return aArray;
}
And surprisingly I am getting an error on the import A.h
Why is this happening?
Any clue?
Thanks