class NSApplication
Declaration(声明)
class NSApplication : NSResponder
Overview(综述)
Every app uses a single instance of NSApplication to control the main event
loop, keep track of the app’s windows and menus, distribute events to the
appropriate objects (that is, itself or one of its windows), set up
autorelease pools, and receive notification of app-level events.
*注释
class NSApplication 在被实例化之后控制整个应用主体的事件循环,并且跟踪应用
轨迹,并将事件分配给合适的对象,建立 autorelease pools ,接受来自应用层的事
件通知。
class NSRunningApplication
Declaration(声明)
class NSRunningApplication : NSObject
Overview(综述)
Some properties of an app are fixed, such as the bundle identifier. Other
properties may vary over time, such as whether the app is hidden.
Properties that vary can be observed with key-value observing, in which
case the description comment for the method notes this capability.
An NSRunningApplication instance remains valid after the app exits. However,
most properties lose their significance, and some properties may not be
available on a terminated application.
*注释
在一个应用内的一些已经被固定得工程,例如打包的标识府。另外一个工程可能已经
超时,例如被隐藏的应用。有些工程的性能和方法的描述注释,在这种情况下应该留
意敏感的关键值。
一个 NSRunningApplication 实例化之后,当app退出之后仍然是有效的。不过。大部
分工程失去他们本身的意义,并且在被终止的应用中的有一些工程可能会失效。
protocol NSApplicationDelegate
Declaration(声明)
protocol NSApplicationDelegate
*注释
协议授权
function NSApplic