I have list of objects in my iOS application, which observe some changes using NSNotificationCenter
.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onSomeChanges)
name:@"SomeConstantNotificatioName" object:nil];
So when notification is posted, NSNotificationCenter
calls onSomeChanges
methods in the same order as addObserver
methods were called.
The question is there any way to changed this order?
What I need is ability to call some adding observer method, which will insert needed observer as the first element of the observers list. So no matter in what order observers are added, some object will receive notification first.
Thank you