UIWindow defines a window object that manages and coordinates the display of an app on the device screen. Unless an app can display content on an external device, there is usually only one window.
Window's main function: 1) provides an area to display views;2) to send events to the views.
If you want to change what your app displays, you can change the window's root view, but you can't create a new Window object.
@property (nonatomic) uiwindowlevel windowlevel //default value is 0.0.
Const uiwindowlevel Uiwindowlevelnormal; Const uiwindowlevel Uiwindowlevelalert; Const uiwindowlevel uiwindowlevelstatusbar;typedef cgfloat uiwindowlevel;
@property (nonatomic, strong) UIScreen *screen //default, all Windows is created on the main device screen
@property (nonatomic, Strong) Uiviewcontroller *rootviewcontroller //The default value is nil. Assigning a view controller to Rootviewcontroller will be the views of the view controller as the content view of the window.
@property (nonatomic, readonly, Getter=iskeywindow) BOOL Keywindow //Keywindow are used to receive keyboards and other non-touch events. Only one window at a time is Keywindow.
-(void)makekeyandvisible //Makes receiver the main window and displays before other horizontal or low-level windows.
-(void) Becomekeywindow //is automatically called when receiver becomes a key window. Never try to call the method directly. Then, a uiwindowdidbecomekeynotification is published to the default notification center.
-(void) Makekeywindow //enable receiver to become the main window.
-(void) Resignkeywindow //is automatically called when receiver discards the key window. Never try to call the method directly. Then, a uiwindowdidresignkeynotification is published to the default notification center.
- (Cgpoint) Convertpoint: (cgpoint) point Towindow: (UIWindow *) window
- (Cgpoint) Convertpoint: (cgpoint) point Fromwindow: (UIWindow *) window
- (CGRect) Convertrect: (cgrect) rect towindow: (UIWindow *) window
- (CGRect) Convertrect: (cgrect) rect fromwindow: (UIWindow *) window
-(void) Sendevent: (Uievent *) Event
UIWindow Official Document parsing