UIWindow Official Document parsing

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.