I\'m pretty new to objective c, and having some basic problems.
I wrote a simple program using a navigator, and everything worked fine. then I added few lines of cod
As others have mentioned, this is indeed caused by cyclic imports. To fix this remove the imports in one of the classes. But sometimes this is not sufficient. If the classes depend on each other, simply forward-declare the one class in the other:
Class A:
#import
@class B; //<- this is essential here
@interface A: NSObject
@property(nonatomic, strong) B *b;
//...
In class B we have:
#import "A.h"
@interface B: NSObject
@property(nonatomic, strong) A *a;