estoy bien cerebral dañado o me falta de alguna understending de NSNotificationCenterNSNotification removeObserver problema
El problema es que si se crea un observador y en la línea siguiente a tratar de eliminarla, así:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllVisibleMapViews) name:@"ClearVisibleMaps" object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"ClearVisibleMaps"];
me sale
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <MyApp 0x592db70> for the key path "ClearVisibleMaps" from <NSNotificationCenter 0x4e0fbb0> because it is not registered as an observer.'
que agregar y quitar la línea de observación después de la línea sólo para hacer un punto. En mi código usaré quitar en el trato.
¿Alguna idea de por qué me dice que no agregué y observo en primer lugar?
gracias, por lo que es cierto que estoy con daño cerebral :-) jeje al menos hoy. – Cyprian