Это зависит от того, какие классы созданы и как, формируя реальные объекты.Это также зависит от того, вызывает ли подкласс super для обработки.В противном случае, как говорится в документации NSNotificationCenter, порядок объектов, получающих уведомления, является случайным и НЕ зависит от того, являетесь ли вы подклассом или суперклассом.Для лучшего понимания рассмотрим следующие примеры: (необходимо несколько примеров, поскольку ваше объяснение не совсем понятно):
Пример 1: два разных объекта
ParentClass *obj1 = [[ParentClass alloc] init];
ChildClass *obj2 = [[ChildClass alloc] init];
// register both of them as listeners for NSNotificationCenter
// ...
// and now their order of receiving the notifications is non-deterministic, as they're two different instances
Пример 2: вызов подкласса super
@implementation ParentClass
- (void) handleNotification:(NSNotification *)not
{
// handle notification
}
@end
@ipmlementation ChildClass
- (void) handleNotification:(NSNotification *)not
{
// call super
[super handleNotification:not];
// actually handle notification
// now the parent class' method will be called FIRST, as there's one actual instace, and ChildClass first passes the method onto ParentClass
}
@end