问题描述
我想使用系统菜单附加功能中的所有功能构建一个附加菜单,但不使用 Apple 实现的私有类.
这是可能的,还是系统菜单附加功能中看到的许多功能都依赖于 SystemUIServer?
I would like to build a menu extra with all the features seen in the system menu extras, but without to use the private class implemented by Apple.
Is that possible, or many of the features seen in the system menu extras depends from SystemUIServer?
推荐答案
这是不可能的.
系统菜单附加功能中存在的功能是通过 SystemUIServer 实现的;实现这些功能的类应该与 SystemUIServer 交互,这意味着如果 SystemUIServer 代码发生更改,则该类也应该更改.与其创建新类,不如使用 Apple 使用的相同类,该类没有记录(并且 Apple 可以随时更改).
It is not possible.
The features present in the system menu extras are implemented through SystemUIServer; a class that would implement those features should interact with SystemUIServer, which means that if SystemUIServer code is changed, also the class should be changed. Rather than creating a new class, it would be better to use the same class used by Apple, which is not documented (and that could be changed from Apple in any moment).
这篇关于构建一个附加菜单,实现系统菜单附加中的所有功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!