NSNotificationCenter Question

Is there a way to find out if an object is registered as an observer for a particular notification? In my implementation, I have to add and remove observers on the fly. For some reason, a random problem occurs when the listener receives the same notification twice. I know that I need to revise my encoding, but it will be easier for me to correct if I knew this information. Thank.

+3
source share
2 answers

No. Unable to request this information. If you need it, you must track it yourself.

+2
source

NSNotificationQueue. Apple. , :

NSNotificationQueue ( ) ( NSNotificationCenter). , , , . Duplicate . ( NSNotification) (FIFO). , , , , , .

, . .

+2

Source: https://habr.com/ru/post/1778886/


All Articles