iphone - observeValueForKeyPath not being called -


i have viewcontroller creating instance of uiview, , register observer instance, such that

logoanimation = [[mainlogoanimation alloc] init]; [logoanimation addobserver:self forkeypath:@"patrociniodidload" options:(nskeyvalueobservingoptionnew|nskeyvalueobservingoptionold) context:nil]; 

then, in same file, have:

- (void)observevalueforkeypath:(nsstring *)keypath ofobject:(id)object change:(nsdictionary *)change context:(void *)context {  nslog(@"%@ \n %@ \n %@ \n ",keypath,object,change); } 

but, although have checked , double-checked logoanimation.patrociniodidload has changed, observevalueforkeypath never gets called...

am missing something?

thanks help!

antonio

solved it: setting patrociniodidload in logoanimation directly, without using standard getters , setters. in logoanimation,

patrociniodidload = yes; 

didn't work, whereas

self.patrociniodidload = yes; 

did!


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -