Official Document Translation

Source: Internet
Author: User

In iOS 9, the new iphone model adds a third dimension to user interface users can press home to quickly access the features provided by your app within your app, users can press to preview the added content and quick access to this Under feature content in order to be able to use directly, please come down to the following Xcode project applicationshortcuts:using Uiapplicationshortcutitem which demonstrates the static and dynamic behavior of home       viewcontrollerpreviews:using the Uiviewcontroller previewing APIsIt shows peek (preview) and Pop (submit), and the quick way to act as a preview
    • touchcanvas:using Uitouch efficiently and effectively, which demonstrates the new Force property added to the Uitouch class
Before you use, make sure you have read 3Dtouch content in IOS Human Interface guidelines aboveThe user can use the Click application icon to launch it, or by long pressing the app icon to edit the status. Now, by tapping the app icon on iphone 6 or IPhone6 Plus, users can get a series of quick-start behaviors. When the user chooses a behavior, the application activates and runs, and your application's proxy object gets a quick behavioral message. The best quick start behavior predicts and accelerates the user's interaction with your application, and the IOS 9 SDK provides a series of APIs Allows you to customize some static or dynamic behavior, but these are only valid for new iphone models
    • Define static behavior, you only need to define in the Uiapplicationshortcutitems array of your application's Info.plist file
    • Defining dynamic behavior, using UIApplicationShortcutItem classes and related APIs, adding dynamic behavior, you just need to use the application'sUIApplication 对象中使用  shortcutItems 属性
Two quick behaviors can exhibit a text hint and an optional icon for Peek and Pop now you can use your view controller (Uiviewcontroller's instanced object) to press the different forces of the corresponding user. As the user presses more and more aggressively, there are three phases of the interaction process:
    1. Interactive display Content Preview
    2. Like peeping, the preview function that can directly function on it is called Peek quick actions (this thing has always been translated)
    3. display optional navigation in the view display- called pop
When you use Peek and pop, the system automatically detects the intensity of the press and determines the phase of the interaction phase to the next interaction, allowing the user to adjust the order of interactions in Settings > general > Accessibility > 3D Touch indication of Peek availabilityWhen the interface is tapped, it will then press the surrounding display frosted glass effect, allowing users to preview the content--peek effective PeekAfter a bit more pressure, the view begins to be converted by peek, showing a view that is directly used to show more content, just as the mail application shows. If the user ends the interaction at this stage, the view of peek disappears, showing the state before the interaction that stage is optional, Users can also use the system-provided pop-up that is called "peeping" by increasing the press force until the navigation is displayed, which is known as "voyeur": the pop-up view fills your app's root view, and returns a button to navigate back to where the interaction started (the last-stage pop-up view is not shown here) Peek Quick Actions If the user is not end touch, the user clicks on the view, the system shows you set the Quick View behavior   Each Quick view behavior is associated with your app, and when the Quick View behavior is visible, when the user is able to end the touch, peek can still be displayed on the screen, allowing the user to click on a behavior to invoke the associated deep connection  You can also have Peek and pop used on the Web view, content described in Web views Peek and pop in force properties in iOS 9, the Uitouch class has two new properties to support application implementation 3D touch: force 和  maximumPossibleForce,这些属性能够让你的事件监听对象在第一时间检测和相应不同的按压力度

Touch-pressed force has a dynamic range that can be passed into your application as a floating-point value

Accessibility and Human Interface guidelines for 3D Touch

To ensure all of the new features that are available to you to access you, branch your code according to whether your application has a touch control, and refer to the following: Checking for 3D touch availability.

Tip: 3D Touch is only available when the device is capable of supporting 3D touch, and is enabled by default in IOS9, the user can turn 3D touch on Settings > General > Accessibility > 3D touch.

When 3D touch is in effect, take full advantage of its functionality and, when invalid, provide some optional, such as Touch and hold

3D Touch New Support Voiceove, for learning voiceove see Accessibility Programming guide for IOS.

To learn more about the new features of 3D Touch, read IOS Human Interface Guidelines

Development environment

Xcode 7 supports the development of 3D touch, and the new debugging features are effective for new 3D touch control

You have to know:
When developing 3D touch with Xcode 7, you must test with a real machine that supports 3D touch, and the simulator does not support 3D touch
With Xcode7, you have to implement your peek and pop view controllers in your code, and Xcode 7 's interface Builde does not support a graphical interface to support configuration view controllers or 3D touch transitions to ensure that you test 3D touch applications on or off , verify that all new features are valid for all users, and on 3D supported devices, you can also disable 3D touch on Settings > General > Accessibility > 3D touch.


—————————————————————————————————————————— This is the first time I translated official documents, a lot of vague, but also look at the pointer, follow-up will be updated gradually

Official Document Translation

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.