The following is my AppDelegate.h file:
#import <UIKit/UIKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end
The following is a file called ViewControllerTEST.h containing the declaration of the ViewController interface used by AppDelegate.h:
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
My question:
How does the compiler know where to find the declaration for the ViewController interface when "@class ViewController" line in AppDelegate.h is ran? In other words, how did the compiler know that the interface for the ViewController class is defined in ViewControllerTEST.h when it's executing the line "@class ViewController" in AppDelegate.h?