IOS learning path window operations

Source: Internet
Author: User

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:

 
 
  1. UIWindowDidBecomeVisibleNotification  
  2. UIWindowDidBecomHiddenNotification  
  3. UIWindowDidBecomKeyNotification  
  4. 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!

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.