Created
June 28, 2013 22:05
-
-
Save PsychoH13/5888505 to your computer and use it in GitHub Desktop.
#import problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------- | |
// A.h | |
#import "B.h" | |
@interface A : NSObject | |
@property B *obj; | |
@end | |
// --------------------------------------- | |
// A.m | |
#import "A.h" | |
@implementation A | |
@end | |
//---------------------------------------- | |
// B.h | |
#import "A.h" | |
@interface B : NSObject | |
@property A *obj; | |
@end | |
// --------------------------------------- | |
// B.m | |
#import "B.h" | |
@implementation B | |
@end | |
//---------------------------------------- | |
// What the compiler do when compiling A.m | |
@interface B : NSObject | |
@property A *obj; | |
@end | |
@interface A : NSObject | |
@property B *obj; | |
@end | |
@implementation A | |
@end | |
//---------------------------------------- | |
// What the compiler do when compiling B.m | |
@interface A : NSObject | |
@property B *obj; | |
@end | |
@interface B : NSObject | |
@property A *obj; | |
@end | |
@implementation B | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment