本文介绍了NSDistributedNotificationCenter的可用通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找Mac上存在的Distributed Notifications列表,例如iTunes com.apple.iTunes.playerInfo,但找不到任何东西.我想知道其他应用程序(例如Safari或QuickTime)是否会收到此类通知?如果它们存在,它们的通知名称是什么?
I was looking for a list of Distributed Notifications that exists on mac like iTunes com.apple.iTunes.playerInfo but I couldn't find anything. I was wondering if other applications like Safari or QuickTime does have such notifications? And if they exists what are their notification names?
致谢
推荐答案
通过添加观察者并将其名称设置为nil,它将显示所有通知.
By adding an observer and setting it's name to nil it will show all the notifications.
[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(observerMethod:) name:nil object:nil];
我没有发现任何特别之处.
I didn't find anything special.
这篇关于NSDistributedNotificationCenter的可用通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!