应用控制器.h
#import <Cocoa/Cocoa.h>
#import "DebugController.h"
@class DebugController;
@interface AppController : NSObject {
DebugController * controller;
}
@end
应用控制器.m
#import "AppController.h"
@implementation AppController
-(void)awakeFromNib {
NSLog(@"awake");
[controller sendDebug];
}
@end
调试控制器.h
#import <Cocoa/Cocoa.h>
#import "AppController.h"
@interface DebugController : NSObject {
}
- (void)sendDebug;
@end
调试控制器.m
#import "DebugController.h"
@implementation DebugController
- (void)sendDebug {
NSLog(@"debug"); // no logs.
}
@end