I ve a class called AppController.h/m I want to make something when the NSNotificationDidResignActiveNotification is sent. So i wrote this code in AppController.m:
-(void) initialize(){
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationDidResignActive:)
name:NSApplicationDidResignActiveNotification
object:nil ];
}
之后
-(void) applicationDidResignActive (NSNotification*) note{
NSBeep();
}
问题在于,该方法在康塞莱实施,而且:
+[AppController applicationDidResignActive:]: unrecognized selector sent to class 0x61c4
I can t get where the problem is: could you help me?
Thank you!