The UIApplication class provides a centralized point of control and coordination for apps running in iOS. Every app has exactly one instance of UIApplication (or, very rarely, a subclass of UIApplication). When an app is launched, the system calls the UIApplicationMain(::::) function; among its other tasks, this function creates a Singleton UIApplication object. Thereafter you access the object by calling the shared() class method.
簡單中文解釋:UIApplication class 提供一個中央管理統合 app 的東西,當 App 啟動(launche)時,系統會呼叫一個方法,在其他相關的方法會創造一個 Singleton UIApplication 物件。
A major role of your app’s application object is to handle the initial routing of incoming user events. It dispatches action messages forwarded to it by control objects (instances of the UIControl class) to appropriate target objects. The application object maintains a list of open windows (UIWindow objects) and through those can retrieve any of the app’s UIView objects.
簡單中文解釋:application 物件主要在負責處理 user event 初始 routing 的工作,它要覺得要把這個 message 傳給誰