The code can add something at some point
[[NSNotificationCenter defaultCenter] AddObserver: Self selector: @Selector (doSomething) Name: @ "hello" item: zero];
How do I check whether this information is already activated or deleted in the queue, to prevent duplicates from being added?
Thank you.
If you mean "whether registered as a supervisor for notification" or not, then I do not think there is easier way to post notification and receive callbacks (with potentially devastating effects).
If there is a risk of double-ed, then I usually use the [[NSNotificationCenter defaultCenter] removeObserver: self name: foo object: bar]
before adding.
Registration for notifications is not on a queue.
Comments
Post a Comment