IOS 9 Split-screen multitasking (2): Slide over & Split view Quick Start

Source: Internet
Author: User

Original source: @ Iron Man-like Qing Brothers Welcome to share the original to Bole headlines

This document contains:
Part I:
iOS 9 Split-screen multitasking – Getting Started
Part II: iOS9 Split-screen multitasking –slide over & split View Quick Start
Part III: iOS9 Split-screen multitasking – pip ) Quick Start

Follow the instructions in this chapter to let your app run iOS 9 multitasking on supported ipad devices.
When you create a new Xcode 7 template project, Slideover and split View are supported by default. If you are upgrading from an old project to IOS9, set up your Xcode project configuration by following these steps, allowing the app to support slide over and split View:

    • Set the base SDK to "Latest IOS" as described in Setting the Base SDK in App distribution guide.
    • Provide the Launchscreen.storyboard file (instead of the. png picture file in iOS 7 and earlier versions). See Creating a Launch screen File in the APP distribution guide.
    • In the project's Info.plist file, in the "Supported Interfaceorientations (IPAD)" Array, the declaration supports all four device orientations, as shown below

Note: If you must not support slide over and split View, explicitly add the Uirequiresfullscreen keyword to the info.plist file of your Xcode project and assign Yes to its Boolean value. You can set it in the Property list Editor, or in the General>deployment info area of the destination editor.

Tip: By setting settings >general > Multitasking, users can disable slide over and split View. If you've set everything right, but still can't use these features, you can check this setting.

For how to use slide over and split View, you can download the Lister (for WatchOS, IOS, and OS X) sample code project.

In Slide over and Splitview, both the primary and secondary apps run in the foreground at the same time, and in most cases they are equal. But only the main apps can:

    • have their own status bar;
    • be eligible to work with a second physical screen;
    • Can be automatically called with PIP;
    • You can occupy the 2/3 screen area under a horizontal screen, and in Split view, the horizontal direction is regular size Class (in a horizontal split view, the secondary app consumes up to one-second of the screen and is compactsize Class horizontally).

In Split view, the user controls the size of your application window. The user does this by rotating the device (such as in an earlier version of iOS), or by sliding the vertical divider that splits the main application and the secondary application horizontally. When two types of changes occur, the system notifies your application in the same way: changes in window bounds are accompanied by changes to the size Classes of the root view controller. (User-moved split-screen controls also show app state transitions, described later in this section.) )

Previously, the ipad's horizontal and vertical size classes always "regular". These have changed greatly with the advent of slide over and Split view. Shows that your app will encounter different sizeclasses after the user operates the ipad screen.

Your app must be adaptive for the app's content to display correctly. Your app settings should:

    • Use auto layout and size Classes as described in Auto Layout guide, size Classes Design help, and simulating screen size and Orientation.

This requires that the Launchscreen.storyboard file in the app must support auto Layout. A new project created using the app template in Xcode 7 automatically generates a Launchscreen.storyboard file. To learn how to add this file to your project, see the Creating a Launch screen file content in the APP distribution guide.

    • Implement methods in Uitraitenvironment and Uicontentcontainer, respond to changes in traitcollection and size.
    • Respond to App State transition protocol method calls as described in execution states for apps in App Programming Guide for IOS.

It is especially important to properly handle the state transitions of your app in IOS9. In the split view context, every time a user moves the split view splitter, two apps on the screen move out of the screen. This happens even when the user changes their mind and returns the splitter to the starting point.

When the user moves the split control, the system invokes the app delegate object using the Applicationwillresignactive: Protocol method.

The system resizes your app (off-screen) to capture one or more snapshots, ensuring a smooth user experience when the user finally releases the delimited control. This is because the final bounds of the window of the app cannot be predicted when the user finally releases the delimited control. The more complex scenario is the rotation of the device and the movement of the divider at the same time.

Ensure that your app does not lose data status or navigation status in size changes, snapshot acquisition processing. This is when a user changes the app size – Move the divider and move it to the initial position to finally release the divider, in which case the user expects the app's state, the navigation position (including view, selection, scrolling position, and others) to be the same as when the user first touched the divider. Make full use of applicationwillresignactive: Call to save the user's state. For more information, please read the App Programming Guide for IOS in the what-if Your App is interrupted temporarily section.

If the user moves the delimited control until the screen bounds let your app disappear, the system calls Applicationdidenterbackground: Protocol method.

For guidance on gracefully handling app state transitions, read the strategies for handling app in the App Programming Guide for IOS section.

For snapshot processing information, please read Prepare for the App Snapshot and refer to capturing a View Snapshot in UIView Class Reference.

All say the programmer's high wages, but very little understanding of their overtime pain, you are not every time in the mind, according to the time to reduce the wages are less, so will want to cry in the heart, or raise wages, or raise wages, or raise wages, why?? Because don't let us work overtime, this is impossible!!!

Want to subvert your work model? Want to reduce your overtime? Join us and explore the free mode of our programmers!

A native app for programmers to share knowledge and skills as a reward for online interactive interactive platform.

We have a top technical team of nearly 20 people, as well as excellent product and operations teams. Team leaders have more than 10 years of experience in the industry.

Now that we are recruiting the original heroes, you will be working with us to change the way programmers work and change the world of programmers! There will also be generous rewards. As our original participant, you will experience this programmer artifact with us, you can offer professional advice, we will adopt it humbly. Everyone will be a hero, and you will be the hero we need! You can also invite your friends to participate in this heroic recruiting interaction.

We will not delay you too much time, we only need your professional opinion, as long as you take 1 hours from one months, you can save two hours a day, everything is for our own!

To? Or not?

Connector Person code: 1955246408 (QQ)

IOS 9 Split-screen multitasking (2): Slide over & Split view Quick Start

Related Article

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.