观察者通知的NSNotification顺序 [英] NSNotification order of observer notifications

查看:104
本文介绍了观察者通知的NSNotification顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有几个类观察特定的NSNotification,那么观察者在发布通知时会以什么顺序通知?

If I have several classes observing a particular NSNotification, in what order are the observers notified when the notification is posted?

推荐答案

无法保证发出的订单通知。如果您需要订购,您可能需要创建一个监听一个通知的类,并发出其他类可以监听的多个有序通知。

There is no guarantee as to what order notifications are sent out. If you need an ordering you may want to create a class that listens for one notification and sends out multiple ordered notifications that other classes can listen for instead.

这篇关于观察者通知的NSNotification顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆