How to build an app that runs on Mac OS 10.6 and supports the NSUserNotificationCenter?

走远了吗. 提交于 2019-12-03 06:17:46

Those are compilation issues and will be fine all the time the Base SDK is 10.8. The center pointer can remain at nil if NSUserNotificationCenter does not exist, and you could therefore use that as a flag to check if you are doing notifications or not in code run after the test.

EDIT In fact leaving it nil will mean you don't even need to check for it; just send messages as normal and they will be ignored if the pointer is nil (this is unless the creation of the message is expensive and you want to save some CPU cycles).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!