IOSMediumWindowThe operation is the content to be introduced in this article. Let's look at the content first.
1. Generally, one iOS program has only oneWindowTo output videos to other devices, you can create multipleWindow.
2. The window is automatically created in the nib file. The default is full screen. Non-full screen Windows may cause loss of input events.
3. Bind the window to the nib file specified by the NSMainNibFile attribute in Info. plist and load the nib file in application: didFinishLauchingWithOption.
Creation Method: self. window = [[[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds] autorelease]; 4. the screen layout is usually implemented by changing the View Size rather than the window size.
5. addSubView is used to add a View and rootViewController is used to control the View hierarchy.
6. WindowLevel: Normal window, Alert alarm window, and Status window.
7,Window eventsTracking:
- UIWindowDidBecomeVisibleNotification
- UIWindowDidBecomHiddenNotification
- UIWindowDidBecomKeyNotification
- UIWindowDidResignKeyNotification
KeyWindow indicates receiving the keyboard.EventOnly one window can become a keyboard at the same time.Event window.
8. Use additional windows and UIScreen objects to process other display devices.
When the program starts, set the screen connection and disconnection reminder.
Obtain the screen attribute of UIScreen, create a UIWindow object, and set the screen attribute.
Set the window size and View.
DisplayWindow. AdditionalWindowContent Update Requirements and masterWindowSynchronization, additionalWindowCannot accept any inputEvent.
9. ScreenMode: size, PixelAspectRatio
Summary:IOSMediumWindowThe operation is complete. I hope this article will help you!